1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Make commands for only a specific job

Discussion in 'Modder General Chat' started by Asriel FBI, Dec 19, 2019.

  1. Asriel FBI

    Asriel FBI New Member

    Hi world.

    I would like to make that a command for example "!delethis" could be used for the Embedded Systems Engineer job only.

    Thanking you in advance for your help :)
  2. se7ensins

    se7ensins Member

    Make a ULX group for the job only and let it do some commands.
  3. LionDaJavaDev

    LionDaJavaDev New Member

    Hey, if you are checking darkRP job and not ULX groups, then you can simply check the player's darkrpvar called job! It would look something like this.

    Code (Text):

    if ply:getDarkRPVar("job") == "EXACT JOB NAME HERE" then
    -- Command code goes in here!
    If you want to ignore capitalization of the job name then you can use this:

    Code (Text):

    if string.lower(ply:getDarkRPVar("job")) == "lowercase job name here" then
    -- Command code goes, wait, take a guess, here!
    Sure, you need to know some gmod lua and you have to know where the command is setup, but if you find it this should be of help to you!

Share This Page