Ulysses

General => Developers Corner => Topic started by: Retalak on September 27, 2014, 10:48:47 AM

Title: Restrict users access to a command based on their DarkRP job
Post by: Retalak on September 27, 2014, 10:48:47 AM
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?
Title: Re: Restrict users access to a command based on their DarkRP job
Post by: Caustic Soda-Senpai on September 27, 2014, 09:11:08 PM
I believe its in the documentation for PlayX somewhere.
Title: Re: Restrict users access to a command based on their DarkRP job
Post by: Snell on October 03, 2014, 07:23:22 PM
Go to the command, Make it available for everyone, In the commands code ad something along the lines of
Code: [Select]
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