General > Developers Corner

using a chat command on a player?

(1/1)

Seal Lord:
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

Ryan Hemmet:
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" }

Navigation

[0] Message Index

Go to full version