Hey guys,
I am making a darkrp server, and I have loads of jobs that are custom made, but I want them to only be allowed for admins and donators to use, how do I do that? Here is my code for my "hitman".
TEAM_BHUNTER = AddExtraTeam("Bounty Hunter", {
color = Color(255, 0, 0, 255),
model = "models/player/leet.mdl",
description = [[You are a bounty hunter. You kill people,
for a price. You can only kill people if you were hired for
the job. You can be demoted for rdm.]],
weapons = {"weapon_silencedpistol","weapon_fists"},
command = "bounty",
max = 3,
salary = 50,
admin = 0,
vote = true,
hasLicense = false,
function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end
})
"function(ply) return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin() end" Doesn't work, I am using FAdmin by the way if you need to know.
Thanks!
[LUA]TEAM_BHUNTER = AddExtraTeam("Bounty Hunter", {
color = Color(255, 0, 0, 255),
model = "models/player/leet.mdl",
description = [[You are a bounty hunter. You kill people,
for a price. You can only kill people if you were hired for
the job. You can be demoted for rdm.]],
weapons = {"weapon_silencedpistol","weapon_fists"},
command = "bounty",
max = 3,
salary = 50,
admin = 0,
vote = true,
hasLicense = false,
customCheck = function(ply)
return ply:GetNWString("usergroup") == "donator" or ply:IsAdmin()
end
})[/LUA]
Try now :P
Thanks! It works!!!
Sorry, you need to Log In to post a reply to this thread.