• RP job problems
    11 replies, posted
This fucking job codeing is harder then you think boys, I am trying to add in a job that is for VIPS only on my friends sever. here is my code What is wrong? I am using ULX as a admin mod! [code] TEAM_CIADA = AddExtraTeam("CIA Double Agent", { color = Color(204, 0, 0, 255), model = "models/humans/mafia/male_08.mdl", description = [[You are part of the cia. You go undercover to catch the criminals of the city. Serve your city proud. You need the starter kit to have this job!]], weapons = {"arrest_stick", "unarrest_stick", "weapon_mad_p90","weapon_mad_deagle", "stunstick", "door_ram", "weaponchecker"}, command = "cia double agent", max = 2, salary = 80, admin = 0, vote = true, hasLicense = true, help = LANGUAGE.cophelp customCheck = function(ply) return ply:CheckGroup("starter") end }) [/code]
i get this shit to :/
Comma after the help = LANGUAGE.cophelp
ok well that error is gone got a other one I do not see the problem in it but maybe you guys can [code] GM.CivilProtection = { [TEAM_POLICE] = true, [TEAM_CHIEF] = true, [TEAM_PRES] = true, [TEAM_SWAT] = true, [TEAM_CIA] = true, [TEAM_SPEC] = true, [TEAM_CIASP] = true, [TEAM_SOLD] = true, [TEAM_CIADA] = true, } [/code]
Replace the brackets with nothing Ignore the pre-edit. I'm fuckin' dumb.
Errors?
so like "TEAM_POPO" = true,
No. TEAM_POPO = true. You can't set the value of an arbitrary string you called into existence for no reason other than that.
You could just use this format for VIP only jobs: [lua] TEAM_PROTHIEF = AddExtraTeam("Pro Thief", { color = Color(102, 153, 153, 255), model = "models/player/lara_cr.mdl", description = [[You break into peoples homes and steal there stuff. Only kill the home or base owners if necessary.]], weapons = {"weapon_fists", "ninjalockpick"}, command = "prothief", max = 2, salary = 100, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return CLIENT or ply:GetNWString("usergroup") == "vip" or ply:GetNWString("moderator") == "vip" or ply:IsAdmin() end, CustomCheckFailMsg = "You need to be a VIP to become this job!" }) [/lua]
I highly recommend using the DarkRP Help mega-thread; [url]http://facepunch.com/showthread.php?t=1249475[/url] I worked off the job code you provided in the first post, this should work just fine; [code]TEAM_CIADA = AddExtraTeam("CIA Double Agent", { color = Color(204, 0, 0, 255), model = "models/humans/mafia/male_08.mdl", description = [[You are part of the cia. You go undercover to catch the criminals of the city. Serve your city proud. You need the starter kit to have this job!]], weapons = {"arrest_stick", "unarrest_stick", "weapon_mad_p90","weapon_mad_deagle", "stunstick", "door_ram", "weaponchecker"}, command = "cia double agent", max = 2, salary = 80, admin = 0, vote = true, hasLicense = true, help = LANGUAGE.cophelp, customCheck = function(ply) return CLIENT or ply:IsUserGroup("starter") end })[/code] The problem came from not adding a comma after "help = LANGUAGE.cophelp" and you're suppose to use IsUserGroup instead of CheckGroup.
CheckGroup is valid when he has ULib. [url]http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html[/url] He already solved the comma problem.
Ah didn't know CheckGroup was valid, thanks for that one. Bookmarked that link.
Sorry, you need to Log In to post a reply to this thread.