Ulysses
General => Developers Corner => Topic started by: gaylord69? on May 12, 2020, 11:56:29 PM
-
how i can make default param for custom command a player themselves?
-
Make the PlayerArg optional and it will default to self.
cmd:addParam{ type=ULib.cmds.PlayerArg, ULib.cmds.optional }
Have a look at the source of "ulx teleport" for a real world example.
See the ULib documentation (https://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.PlayerArg) for more details.