ULX

Author Topic: Restrict users access to a command based on their DarkRP job  (Read 1958 times)

0 Members and 1 Guest are viewing this topic.

Offline Retalak

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Restrict users access to a command based on their DarkRP job
« 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?

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Restrict users access to a command based on their DarkRP job
« Reply #1 on: September 27, 2014, 09:11:08 PM »
I believe its in the documentation for PlayX somewhere.
Once you get to know me, you'll find you'll have never met me at all.

Offline Snell

  • Newbie
  • *
  • Posts: 11
  • Karma: 2
Re: Restrict users access to a command based on their DarkRP job
« Reply #2 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