How would I go across banning a player from a team for a certain amount of round or forever? I have a command which swaps them to the other team but I cannot suss it out. Could someone please help?
// Prisoner //
function ulx.prisoner( calling_ply, target_plys )
for i=1, #target_plys do
for n=#GAMEMODE.GuardQueue,1,-1 do
if GAMEMODE.GuardQueue[n]==target_plys[i] then table.remove( GAMEMODE.GuardQueue, n ) end
end
end
ulx.fancyLogAdmin( calling_ply, "#A has forced #T to Prisoner next round", target_plys )
GAMEMODE:UpdateGuardQueue()
end
local fprisoner = ulx.command( CATEGORY_NAME, "ulx prisoner", ulx.prisoner, "!prisoner" )
fprisoner:addParam{ type=ULib.cmds.PlayersArg }
fprisoner:defaultAccess( ULib.ACCESS_ADMIN )
fprisoner:help( "Forces the target(s) to join the Prisoner team." )
The teams are as followed;
TEAM_PRISONER = Prisoners
TEAM_JAILOR = Guards
I need a command for only guard ban. If they tried to join that team it would display a message like "Sorry, you are banned form this team for X rounds/forever."
If someone could help me out, you would be a life saver. I've tried so many possibilities but they haven't worked as I am not good on LUA.
Thanks,
Lubricant Jam.