function ulx.tttspec( calling_ply, target_plys, should_unspec )
if not GetConVarString("gamemode") == "terrortown" then ULib.tsayError( calling_ply, gamemode_error, true ) else
for i=1, #target_plys do
local v = target_plys[ i ]
if should_unspec then
v:ConCommand("ttt_spectator_mode 0")
else
v:ConCommand("ttt_spectator_mode 1")
v:ConCommand("ttt_cl_idlepopup")
end
end
if should_unspec then
ulx.fancyLogAdmin( calling_ply, "#A has forced #T to join the world of the living.", target_plys )
else
ulx.fancyLogAdmin( calling_ply, "#A has forced #T to spectate.", target_plys )
end
end
end
local tttspec = ulx.command( CATEGORY_NAME, "ulx fspec", ulx.tttspec, "!fspec" )
tttspec:addParam{ type=ULib.cmds.PlayersArg }
tttspec:addParam{ type=ULib.cmds.BoolArg, invisible=true }
tttspec:defaultAccess( ULib.ACCESS_ADMIN )
tttspec:setOpposite( "ulx unspec", {_, _, true}, "!unspec" )
tttspec:help( "Forces the <target(s)> to/from spectator." )
NOT MY CODE