Author Topic: Gag & mute.  (Read 3359 times)

0 Members and 1 Guest are viewing this topic.

Offline Spider

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Gag & mute.
« on: June 18, 2013, 10:44:48 AM »
I need a command that gags AND mutes the player with one command. I'm new to coding ulx, and this is what I came up with and it failed horribly.

Quote
function ulx.mute2( calling_ply, target_plys )
   local affected_plys = {}

   for i=1, #target_plys do
      local v = target_plys[ i ]
      v:ConCommand:("ulx gag")
      v:ConCommand:("ulx mute")
   

   ulx.fancyLogAdmin( calling_ply, "#A gagged and muted #T!", command, target_plys )
end
local mute2= ulx.command( "Zero's Commands", "ulx mute2", ulx.mute2, "!mute2" )
mute2:defaultAccess( ULib.ACCESS_SUPERADMIN )
mute2:help( "Gags and mutes the target." )

My main problem is how to get the v:ConCommand("ulx gag") to target someone.
« Last Edit: June 18, 2013, 10:47:47 AM by Spider »

An Error Has Occurred!

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