1. 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.

ULX whitlisting

Discussion in 'DarkRP Modding Questions & Help' started by BabyHasBigFists, Jan 11, 2017.

  1. BabyHasBigFists

    BabyHasBigFists New Member

    please help. I'm coding for a server and my usual code for whitelisting is not working for some unknown reason. i will put one of the custom jobs in here.


    TEAM_41STCOMMANDER=DarkRP.createJob("41st Commander", {
    color = Color(24, 176, 30, 255),
    model = {"models/player/emp/starwars/gcgree.mdl"},
    description = [[ ]],
    weapons = {"weapon_752_dc17m_sn", "weapon_752_dc15a"},
    command = "41stCommander",
    max = 1,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "41st Battalion",
    ammo = {
    ["ar2"] = 5000
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(600)
    ply:SetHealth(600)
    end,
    customCheck = function(ply) return CLIENT or
    table.HasValue({"41st Commander", "Lead Developer", "Co-Owner", "Owner", "superadmin", "admin", "operator", "Manager"}, ply:GetNWString("usergroup"))
    CustomCheckFailMsg = "ok",
    end
    })


    any and all help is appreciated. Thank you !
     
  2. MaccyD

    MaccyD Member

    customcheckfailmsg is supposed to be outside the custom check,

    2nd time in the past 2 days: a return function ENDS the code and expects an END after the return function, anything after the return function and the END is obsolete, and may even cause errors, you shouldn't be coding for a server if you do not know this
     
  3. BabyHasBigFists

    BabyHasBigFists New Member

    thank you MaccyD. I will try this on the server.
    --- Double Post Merged, Jan 11, 2017 ---
    Sadly this did not work.
    TEAM_41STCOMMANDER=DarkRP.createJob("41st Commander", {
    color = Color(24, 176, 30, 255),
    model = {"models/player/emp/starwars/gcgree.mdl"},
    description = [[ ]],
    weapons = {"weapon_752_dc17m_sn", "weapon_752_dc15a"},
    command = "41stCommander",
    max = 1,
    salary = 50,
    admin = 0,
    vote = false,
    hasLicense = true,
    candemote = false,
    category = "41st Battalion",
    ammo = {
    ["ar2"] = 5000
    },
    PlayerSpawn = function(ply)
    ply:SetMaxHealth(600)
    ply:SetHealth(600)
    end,
    customCheck = function(ply) return CLIENT or
    table.HasValue({"41st Commander", "Lead Developer", "Co-Owner", "Owner", "superadmin", "admin", "operator", "Manager"}, ply:GetNWString("usergroup"))
    end,
    CustomCheckFailMsg = "ok",
    })

    on the server it is on base mode and it says this is the problem. It is completely broken.
     
    Last edited: Jan 11, 2017
  4. MaccyD

    MaccyD Member

    posting errors would be useful
     
    Alphaverse likes this.
  5. BabyHasBigFists

    BabyHasBigFists New Member

    well idk what happened but it works now. idk.
     

Share This Page