1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Incorrect Model?

Discussion in 'DarkRP Modding Questions & Help' started by ItsNova, Nov 1, 2016.

  1. ItsNova

    ItsNova New Member

    Hello! I have just recently started a server and installed some mods and I moved on to the custom jobs.
    I made 2 classes without testing either, and the very first one causes an error.
    Code (Text):
    [ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line 20.
    The best help I can give you is this:

    Corrupt team: Owner On Duty!
    The model must either be a table of correct model strings or a single correct model string.

    Hints:
        - This error could happens when the model does not exist on the server.
        - Are you sure the model path is right?
        - Is the model from an addon that is not properly installed?

    The responsibility for the error above lies with (the authors of) one (or more) of these files:
        1. lua/darkrp_customthings/jobs.lua on line 20
        2. function 'xpcall'
        3. gamemodes/darkrp/gamemode/libraries/simplerr.lua on line 477
        4. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
        5. gamemodes/darkrp/gamemode/libraries/fn.lua on line 84
        6. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 137
        7. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 148
        8. gamemodes/darkrp/gamemode/init.lua on line 86
    ------- End of Simplerr error -------
     
    And no jobs, shipments or weapons load, every tab is blank, except for jobs which has 2 categories with nothing in them.
    jobs.lua :
    Code (Text):
    --[[---------------------------------------------------------------------------
    DarkRP custom jobs
    ---------------------------------------------------------------------------

    This file contains your custom jobs.
    This file should also contain jobs from DarkRP that you edited.

    Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
        Once you've done that, copy and paste the job to this file and edit it.

    The default jobs can be found here:
    https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua

    For examples and explanation please visit this wiki page:
    http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields


    Add jobs under the following line:
    ---------------------------------------------------------------------------]]
    TEAM_OOD = DarkRP.createJob("Owner On Duty"), {color = Color(255,0,0,255),model = "models/player/combine_soldier.mdl",description = [[For Nova Only *PICKING THIS CLASS AS ANYONE ELSE WILL GET PERM BANNED*]],weapons = {weapons},command = "ood",max = 1,salary = 1000,admin = 2,vote = false,hasLicense = true,candemote = false,category = "Admins"}
    TEAM_HITMAN = DarkRP.createJob("Hitman"), {color = Color(0,155,255,255),model = "models/player/leet.mdl",description = [[You get money for killing people requested by your clients.]],weapons = {"weapon_awpdragon","m9k_deagle"},command = "hitman",max = 3,salary = 100, admin = 0,vote = false,hasLicense = false,candemote = false,category = "Criminals"}
    --TEAM_LGUN = DarkRP.createJob("Light Gun Dealer"), {color = Color(0,100,155,255), model = {"models/player"}}




    --[[---------------------------------------------------------------------------
    Define which team joining players spawn into and what team you change to if demoted
    ---------------------------------------------------------------------------]]
    GAMEMODE.DefaultTeam = TEAM_CITIZEN


    --[[---------------------------------------------------------------------------
    Define which teams belong to civil protection
    Civil protection can set warrants, make people wanted and do some other police related things
    ---------------------------------------------------------------------------]]
    GAMEMODE.CivilProtection = {
        [TEAM_POLICE] = true,
        [TEAM_CHIEF] = true,
        [TEAM_MAYOR] = true,
    }

    --[[---------------------------------------------------------------------------
    Jobs that are hitmen (enables the hitman menu)
    ---------------------------------------------------------------------------]]
    DarkRP.addHitmanTeam(TEAM_HITMAN)
     
    The model DOES exsist in the server, as the model I put in the "model" spot spawns in successfully as a ragdoll ingame.

    If I am missing anything let me know and I will add it.
     
  2. Pab14567

    Pab14567 Well-Known Member

    You're doing it wrong putting the jobs on.

    Code (Lua):
     
    TEAM_OOD = DarkRP.createJob("Owner on Duty", {
    color = Color(255,0,0),
    model = "models/player/combine_soldier.mdl",
    description = [[ Hi this is a shitty abuse job that is not even needed on a server, it's fucking stupid ]],
    weapons = {},
    command = "ood",
    max = 1,
    salary = 9990,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "Admins",
    customCheck = function(ply) return ply:GetUserGroup() == "Shitty abusive Owner rank here" end

    )}
     
    Proper way of putting it on and so forth.
     
  3. ItsNova

    ItsNova New Member

    Yeah I fixed it after noticing I did it wrong. Thanks for the help though!
    Also, I see your little notes and I'm going to base the admin classes after this. I will delete this class after I'm done with everything else.
     

Share This Page