--[[ Title: TTT Some TTT related functions (respawn,traitor,detective,innocent) Made by Oren Yomtov (thenameisoren at gmail)]]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" )
--[[ Title: TTT Some TTT related functions (respawn,traitor,detective,innocent) Made by Oren Yomtov (thenameisoren at gmail)]]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" )