Gag & mute.

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.

ULX has a command called !gimp which to my understanding if its like the old school gimp it will gag/mute players. I don’t know if ULX has ever fixed this, last I knew the gag or mute part didn’t work this was gmod11 though.

If it doesn’t work, just fix up the !gimp code it should be a good base.

nah swift, that’s not what gimp does in ULX.

with gimp, in the data/ulx folder you have a txt file called gimps.txt, where you write preset messages (1 per line) and when you gimp somebody, whenever they type anything, it gets automatically changed to a random thing in that list.