Advertisement
Dadido3

moar comamamadnadds

Apr 26th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. local CATEGORY_NAME = "ZS ULX Commands"
  2.  
  3. function ulx.respawn( calling_ply, target_plys )
  4. local affected_plys = {}
  5.  
  6. for k, v in pairs( target_plys ) do
  7. if v:Alive() then
  8. ULib.tsayError( calling_ply, v:Nick() .. " is already spawned!", true )
  9. else
  10. v:SetTeam( TEAM_UNDEAD )
  11. v:Spawn()
  12. table.insert( affected_plys, v )
  13. end
  14. end
  15.  
  16. ulx.fancyLogAdmin( calling_ply, false, "#A respawned #T", affected_plys )
  17. end
  18.  
  19. local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx.respawn, "!spawn", true)
  20. respawn:addParam{ type=ULib.cmds.PlayersArg }
  21. respawn:defaultAccess( ULib.ACCESS_ADMIN )
  22. respawn:help( "Respawn the target(s)." )
  23.  
  24. function ulx.kill( calling_ply )
  25. calling_ply:Kill()
  26. ulx.fancyLogAdmin( calling_ply, false, "#A killed #T", calling_ply )
  27. end
  28.  
  29. local kill = ulx.command( CATEGORY_NAME, "ulx kill", ulx.kill, "!kill", true)
  30. kill:defaultAccess( ULib.ACCESS_ALL )
  31. kill:help( "Commit suicide" )
  32.  
  33. function ulx.respawn( calling_ply, target_plys )
  34.  
  35. local affected_plys = {}
  36. for i=1, #target_plys do
  37. local pl = target_plys[ i ]
  38.  
  39. if ulx.getExclusive( pl, calling_ply ) then
  40. ULib.tsayError( calling_ply, ulx.getExclusive( pl, calling_ply ), true )
  41. else
  42. hook.Call( "PlayerRespawn", GAMEMODE, pl ) -- Then put the arguments you want for PlayerRedeemed in here, already done pl
  43. table.insert( affected_plys, pl )
  44. end
  45. end
  46.  
  47. ulx.fancyLogAdmin( calling_ply, "#A redeemed #T", affected_plys )
  48. end
  49. local respawn = ulx.command( "Zombie Survival", "ulx respawn", ulx.respawn, "!respawn" )
  50. respawn:addParam{ type=ULib.cmds.PlayersArg }
  51. respawn:defaultAccess( ULib.ACCESS_ADMIN )
  52. respawn:help( "Redeems target(s)." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement