I really need help on making a job be for some ULX groups.
Such as the job will only be able to, vip, donator, moderator, admin, superadmin only (These are the groups i have on my server)
[HTML]TEAM_VIP = AddExtraTeam("Tech Leader", {
color = Color(100, 100, 100, 255),
model = "models/player/slow/tau_commander/slow_tau_commander.mdl",
description = [[Leader of the Tech Legion.]],
weapons = {"weapon_fists", "weapon_real_cs_ak47", "keypad_cracker"},
command = "techl",
max = 2,
salary = 100,
admin = 0,
vote = false,
hasLicense = true,
candemote = false[/HTML]
[code]TEAM_VIP = AddExtraTeam("Tech Leader", {
color = Color(100, 100, 100, 255),
model = "models/player/slow/tau_commander/slow_tau_commander.mdl",
description = [[Leader of the Tech Legion.]],
weapons = {"weapon_fists", "weapon_real_cs_ak47", "keypad_cracker"},
command = "techl",
max = 2,
salary = 100,
admin = 0,
vote = false,
hasLicense = true,
candemote = false
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" end -- taken right from the DarkRP wiki.
})
[/code]
NOTE: This will restrict the job to donators ONLY. Admins/SAdmins cannot get it. To make it available to them, add an or like so. This is assuming that is how ULX works(I haven't used ULX in a long time.). Change "donator" to whatever you want the job to be restricted to. VIP, moderator, etc.
[code]
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end
[/code]
If you don't like my explanation, you can read about it on the Wiki: [url]http://wiki.darkrp.com/index.php/DarkRP-Config[/url]
[QUOTE=Lolcats;41291960][code]TEAM_VIP = AddExtraTeam("Tech Leader", {
color = Color(100, 100, 100, 255),
model = "models/player/slow/tau_commander/slow_tau_commander.mdl",
description = [[Leader of the Tech Legion.]],
weapons = {"weapon_fists", "weapon_real_cs_ak47", "keypad_cracker"},
command = "techl",
max = 2,
salary = 100,
admin = 0,
vote = false,
hasLicense = true,
candemote = false
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" end -- taken right from the DarkRP wiki.
})
[/code]
NOTE: This will restrict the job to donators ONLY. Admins/SAdmins cannot get it. To make it available to them, add an or like so. This is assuming that is how ULX works(I haven't used ULX in a long time.). Change "donator" to whatever you want the job to be restricted to. VIP, moderator, etc.
[code]
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end
[/code]
If you don't like my explanation, you can read about it on the Wiki: [url]http://wiki.darkrp.com/index.php/DarkRP-Config[/url][/QUOTE]
I dont know how to make more ULX groups to that job.
I want the job to be with the ULX Groups; vip, donator, moderator, admin, superadmin ONLY. And not for all "user".
The continuation of this should be fairly obvious.
[code]
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:GetNWString("usergroup") == "moderator" end
CustomCheckFailMsg = "gib shekels pls"
[/code]
Just add more "or" statements to check for multiple groups.
[QUOTE=MuteTM;41296865]The continuation of this should be fairly obvious.
[code]
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:GetNWString("usergroup") == "moderator" end
CustomCheckFailMsg = "gib shekels pls"
[/code]
Just add more "or" statements to check for multiple groups.[/QUOTE]
Remember comma after the customCheck function.
[QUOTE=MuteTM;41296865]The continuation of this should be fairly obvious.
[code]
customCheck = function(ply) return ply:GetNWString("usergroup") == "donator" or ply:GetNWString("usergroup") == "moderator" end
CustomCheckFailMsg = "gib shekels pls"
[/code]
And does this command do?
[QUOTE]CustomCheckFailMsg = "gib shekels pls"[/QUOTE]
Just add more "or" statements to check for multiple groups.[/QUOTE]
NVM
Sorry, you need to Log In to post a reply to this thread.