General > Developers Corner
Restrict users access to a command based on their DarkRP job
(1/1)
Retalak:
I want to make it to where people be granted access to "playx access" when they switch to DJ in my darkrp server, but when they switch to another job, they access is revoked. Any ideas on how to do so?
Caustic Soda-Senpai:
I believe its in the documentation for PlayX somewhere.
Snell:
Go to the command, Make it available for everyone, In the commands code ad something along the lines of
--- Code: ---if not calling_ply:getdarkrpjobfunctiongoeshere ( "jobname I guess" ) then
ULib.tsayError( calling_ply, "You need to be a DJ to use this command", true )
return
end
--- End code ---
Navigation
[0] Message Index
Go to full version