General > Developers Corner
ULX Command Help Please
GlossyELHS:
Hey guys. So I have a ULX command that I want to implement to my server. I have started to learn a lot of GLua and coded my own HUD so I'm not like bad at programming but I want to start doing ULX commands as well and I was hoping someone could help me.
I know how to make a ULX command to target someone but I want to make a ULX command that makes someone say something, so like this:
They type !glossy and it says "I hate Glossy" from them.
Thanks in advance for the help
Timmy:
You can use Player:Say to make a player to say something.
GlossyELHS:
Okay, so how would I structure the command? I have a command that I have done already which is structured like this -
--- Code: ---function ulx.trout(calling_ply, target_plys)
ulx.fancyLogAdmin( calling_ply, "#A slapped #T with a trout", target_plys)
end
local trout = ulx.command("Donor Commands", "ulx trout", ulx.trout, "!trout",true)
trout:addParam{ type=ULib.cmds.PlayersArg }
trout:defaultAccess( ULib.ACCESS_SUPERADMIN )
trout:help( "trout someone." )
--- End code ---
GlossyELHS:
--- Quote from: Timmy on July 05, 2017, 04:39:08 AM ---You can use Player:Say to make a player to say something.
--- End quote ---
^^
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version