I have a command that when someone uses it, it will put them in spectator mode. Right now I have:
local CATEGORY_NAME = "Utility"
function ulx.afk( calling_ply, should_afk )
if ( not should_afk ) then
calling_ply:ConCommand( "ttt_spectator_mode 0" )
ULib.tsay( calling_ply, "You have disabled spectator mode. You will return next round." )
elseif ( should_afk ) then
calling_ply:ConCommand( "ttt_spectator_mode 1" )
ULib.tsay( calling_ply, "You have enabled spectator mode." )
end
end
local afk = ulx.command( CATEGORY_NAME, "ulx afk", ulx.afk, "!afk" )
afk:defaultAccess( ULib.ACCESS_ALL )
afk:help( "Set yourself to Spectator Mode." )
afk:setOpposite( "ulx unafk", { _, _, 0 }, "!unafk" )
But no matter what I type, !afk or !unafk, it will always activates the "not should_afk" part.
Screenshot:

No errors, no nothing. Just that. I'm not good with setOpposite, what am I doing wrong here?
OT: When I'm on a listen server, do I have access to all commands even if I'm not in superadmin group?