ULX

Author Topic: using a chat command on a player?  (Read 1529 times)

0 Members and 1 Guest are viewing this topic.

Offline Seal Lord

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
using a chat command on a player?
« on: August 05, 2015, 06:13:34 AM »
hey, i was trying to figure out how to get the value of a player so i can use the command on them e.x: !kick <user> or !whitelist <ip/name> i can make the command but i cant seem to get the name of a player any help would be appreciated! Thanks

Offline Ryan Hemmet

  • Newbie
  • *
  • Posts: 20
  • Karma: 8
    • https://adversarygaming.com
Re: using a chat command on a player?
« Reply #1 on: August 06, 2015, 10:04:21 AM »
If I am understanding you correctly you want one of the arguments to be a player?

Ways for ULX

For a player:
YOURCOMMAND:addParam{ type=ULib.cmds.PlayerArg }

For an IP, you need to add this:
YOURCOMMAND:addParam{ type=ULib.cmds.StringArg }

For either of those you could also add a hint, for instance, psay:addParam{ type=ULib.cmds.PlayerArg, hint="player" }