/*------------------------------------------------------------------------------------------------------------------------- Traitor-------------------------------------------------------------------------------------------------------------------------*/local PLUGIN = {}PLUGIN.Title = "Traitor"PLUGIN.Description = "Makes a player traitor"PLUGIN.Author = "-[LCG]- Marvincmarvin | mostly Overv"PLUGIN.ChatCommand = "traitor"PLUGIN.Usage = "[players]"PLUGIN.Privileges = { "Trait" }function PLUGIN:Call( ply, args ) if ( ply:EV_HasPrivilege( "Trait" ) ) then local players = evolve:FindPlayer( args, ply ) for _, pl in ipairs( players ) do pl:SetRole(ROLE_TRAITOR) SendFullStateUpdate() end if ( #players > 0 ) then evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has traitorized ", evolve.colors.red, evolve:CreatePlayerList( players ), evolve.colors.white, "." ) else evolve:Notify( ply, evolve.colors.red, evolve.constants.noplayers ) end else evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed ) endendevolve:RegisterPlugin( PLUGIN )
/*------------------------------------------------------------------------------------------------------------------------- INNOCENT-------------------------------------------------------------------------------------------------------------------------*/local PLUGIN = {}PLUGIN.Title = "Innocent"PLUGIN.Description = "Makes a player Innocent"PLUGIN.Author = "-[LCG]- Marvincmarvin | mostly Overv Edited by Anonymous"PLUGIN.ChatCommand = "innocent"PLUGIN.Usage = "[players]"PLUGIN.Privileges = { "Trait" }function PLUGIN:Call( ply, args ) if ( ply:EV_HasPrivilege( "Trait" ) ) then local players = evolve:FindPlayer( args, ply ) for _, pl in ipairs( players ) do pl:SetRole(ROLE_TERROR) SendFullStateUpdate() end if ( #players > 0 ) then evolve:Notify( evolve.colors.blue, ply:Nick(), evolve.colors.white, " has innocentized ", evolve.colors.red, evolve:CreatePlayerList( players ), evolve.colors.white, "." ) else evolve:Notify( ply, evolve.colors.red, evolve.constants.noplayers ) end else evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed ) endendevolve:RegisterPlugin( PLUGIN )
ulx.setCategory( "TTT" )function ulx.cc_respawn( ply, command, argv, args ) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS, true ) return end local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords if not targets then ULib.tsay( ply, err, true ) return end for _, v in ipairs( targets ) do ulx.logUserAct( ply, v, "#A respawned #T" ) v:SpawnForRound(true) endendulx.concommand( "respawn", ulx.cc_respawn, "<user(s)> - Respawns target(s).", ULib.ACCESS_ADMIN, "!respawn", _, ulx.ID_PLAYER_HELP )ulx.addToMenu( ulx.ID_MCLIENT, "Respawn", "ulx respawn" )function ulx.cc_traitor( ply, command, argv, args ) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS, true ) return end local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords if not targets then ULib.tsay( ply, err, true ) return end for _, v in ipairs( targets ) do ulx.logUserAct( ply, v, "#A turned #T into a traitor" ) v:SetRole(ROLE_TRAITOR) SendFullStateUpdate() endendulx.concommand( "traitor", ulx.cc_traitor, "<user(s)> - Turns target(s) into traitors.", ULib.ACCESS_ADMIN, "!traitor", _, ulx.ID_PLAYER_HELP )ulx.addToMenu( ulx.ID_MCLIENT, "Traitor", "ulx traitor" )function ulx.cc_detective( ply, command, argv, args ) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS, true ) return end local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords if not targets then ULib.tsay( ply, err, true ) return end for _, v in ipairs( targets ) do ulx.logUserAct( ply, v, "#A turned #T into a detective" ) v:SetRole(ROLE_DETECTIVE) SendFullStateUpdate() endendulx.concommand( "detective", ulx.cc_detective, "<user(s)> - Turns target(s) into detectives.", ULib.ACCESS_ADMIN, "!detective", _, ulx.ID_PLAYER_HELP )ulx.addToMenu( ulx.ID_MCLIENT, "Detective", "ulx detective" )function ulx.cc_innocent( ply, command, argv, args ) if #argv < 1 then ULib.tsay( ply, ulx.LOW_ARGS, true ) return end local targets, err = ULib.getUsers( argv[ 1 ], _, true, ply ) -- Enable keywords if not targets then ULib.tsay( ply, err, true ) return end for _, v in ipairs( targets ) do ulx.logUserAct( ply, v, "#A turned #T into an innocent" ) v:SetRole(ROLE_INNOCENT) SendFullStateUpdate() endendulx.concommand( "innocent", ulx.cc_innocent, "<user(s)> - Turns target(s) into innocents.", ULib.ACCESS_ADMIN, "!innocent", _, ulx.ID_PLAYER_HELP )ulx.addToMenu( ulx.ID_MCLIENT, "Innocent", "ulx innocent" )