Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CATEGORY_NAME = "ZS ULX Commands"
- function ulx.respawn( calling_ply, target_plys )
- local affected_plys = {}
- for k, v in pairs( target_plys ) do
- if v:Alive() then
- ULib.tsayError( calling_ply, v:Nick() .. " is already spawned!", true )
- else
- v:SetTeam( TEAM_UNDEAD )
- v:Spawn()
- table.insert( affected_plys, v )
- end
- end
- ulx.fancyLogAdmin( calling_ply, false, "#A respawned #T", affected_plys )
- end
- local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx.respawn, "!spawn", true)
- respawn:addParam{ type=ULib.cmds.PlayersArg }
- respawn:defaultAccess( ULib.ACCESS_ADMIN )
- respawn:help( "Respawn the target(s)." )
- function ulx.kill( calling_ply )
- calling_ply:Kill()
- ulx.fancyLogAdmin( calling_ply, false, "#A killed #T", calling_ply )
- end
- local kill = ulx.command( CATEGORY_NAME, "ulx kill", ulx.kill, "!kill", true)
- kill:defaultAccess( ULib.ACCESS_ALL )
- kill:help( "Commit suicide" )
- function ulx.respawn( calling_ply, target_plys )
- local affected_plys = {}
- for i=1, #target_plys do
- local pl = target_plys[ i ]
- if ulx.getExclusive( pl, calling_ply ) then
- ULib.tsayError( calling_ply, ulx.getExclusive( pl, calling_ply ), true )
- else
- hook.Call( "PlayerRespawn", GAMEMODE, pl ) -- Then put the arguments you want for PlayerRedeemed in here, already done pl
- table.insert( affected_plys, pl )
- end
- end
- ulx.fancyLogAdmin( calling_ply, "#A redeemed #T", affected_plys )
- end
- local respawn = ulx.command( "Zombie Survival", "ulx respawn", ulx.respawn, "!respawn" )
- respawn:addParam{ type=ULib.cmds.PlayersArg }
- respawn:defaultAccess( ULib.ACCESS_ADMIN )
- respawn:help( "Redeems target(s)." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement