ULX

Author Topic: ULX Command Help Please  (Read 2403 times)

0 Members and 2 Guests are viewing this topic.

Offline GlossyELHS

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
ULX Command Help Please
« on: July 05, 2017, 04:17:10 AM »
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

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: ULX Command Help Please
« Reply #1 on: July 05, 2017, 04:39:08 AM »
You can use Player:Say to make a player to say something.

Offline GlossyELHS

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: ULX Command Help Please
« Reply #2 on: July 05, 2017, 04:40:35 AM »
Okay, so how would I structure the command? I have a command that I have done already which is structured like this -

Code: [Select]
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." )

Offline GlossyELHS

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: ULX Command Help Please
« Reply #3 on: July 05, 2017, 04:45:16 AM »
You can use Player:Say to make a player to say something.

^^

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given