Ulysses
General => Developers Corner => Topic started by: Mark Kane on January 14, 2015, 01:05:13 AM
-
Alrighty i tried a BUNCH of stuff to do it and nothing works, and ANY help would be useful at this point
This is my Vip swat code (it works)
TEAM_Swat = AddExtraTeam("Swat", Color(65, 21, 132, 255), "models/player/swat.mdl", [[The protector of every citizen that lives in the city. You have the power to arrest criminals and protect innocents. Hit a player with your arrest baton to put them in jail. Bash a player with a stunstick and they may learn to obey the law. The Battering Ram can break down the door of a criminal, with a warrant for their arrest. The Battering Ram can also unfreeze frozen props (if enabled).Type /wanted <name> to alert the public to the presence of a criminal. VIP JOB
]], {"m9k_deagle","arrest_stick","unarrest_stick","stunstick","door_ram","weaponchecker"}, "Swat", 5, 100, 0, false, true)
I want to make it VIP only but it doesn't seem to wanna work with the extra code to do that i put in it
I saw a few posts that i should use this format
TEAM_ = DarkRP.createJob("", {
color = Color(0, 0, 0, 255),
model = {"models/player/group01/male_01.mdl"},
description = [[]],
weapons = {"weapon_ak472"},
command = "",
max = 5,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
(yes its empty i just used it as a ref)
But this code doesn't work for me it eather disables all the Custom jobs or removes my all the jobs
Like i said any help is greatly appreciated
Thanks In advance
~Mark Kane
-
Hello,
as far as I am concerned DarkRP Jobs use a customCheck to check if the player may use/become this class.
Take a look at this:
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end, -- The extra check function. Enter nil or nothing to not have a restriction
Found by a simple google search: Here (http://wiki.darkrp.com/index.php/Donator_Job_configuration)
Avoid
-
But this code doesn't work for me it eather disables all the Custom jobs or removes my all the jobs
Ensure every setting has a comma after it except the last one.
PRAISE TO COMMAS, THEY ARE THE MOST OVERLOOKED THING.
-
Well thank you all i had a friend help me with it, First server im making to kinda get my feet wet with lua ect.
But thank you for assisting we will make it trough this together