• ULX DarkRP Custom Job
    3 replies, posted
I would like to make a custom job, for a specific player how would I do this? [CODE]TEAM_SOAP = AddExtraTeam("Soap", { color = Color(102, 204, 255, 255), model = "models/pac.mdl", description = [[If you are caught using this job, you will be banned (apart from Soap).]], weapons = {"m9k_g36", "climb_swep2"}, command = "soap", max = 1, salary = 10, admin = 0, vote = false, hasLicense = false, customCheck = function(ply) return ply:GetUserGroup() == "community manager" end, PlayerLoadout = function( ply ) return ply:SetArmor( 0 ) end })[/CODE] Thats the job, but I would like to change this bit: [CODE] customCheck = function(ply) return ply:GetUserGroup() == "community manager" end,[/CODE] So it worked for a specific player not group. Would it be: [CODE]return ply:SteamID(steam_12334) end,[/CODE] Sorry I am a lua noobie.
[CODE]function(ply) return ply:SteamID() == "IDHere" end[/CODE]
[QUOTE=brandonj4;43538917][CODE]function(ply) return ply:SteamID() == "IDHere" end[/CODE][/QUOTE] How would I do it for two steam ids?
[QUOTE=F14;43549582]How would I do it for two steam ids?[/QUOTE] I'm assuming that the base darkrp code will base the callback off false or nil: [lua] local allowedIDs = { ["IDHere1"] = true, ["IDHere2"] = true } function(ply) return allowedIDs[ply:SteamID()] end [/lua]
Sorry, you need to Log In to post a reply to this thread.