Advertisement
Guest User

112112

a guest
May 22nd, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. function ulx.respawn(calling_ply,target_plys)
  2. local affected_plys = {}
  3.  
  4.     for k,v in pairs(target_plys) do
  5.         if (not v:Alive()) and (v:Team() == 1 or v:Team() == 2) then
  6.             table.insert(affected_plys,v)
  7.         else
  8.             ULib.tsayError(calling_ply,v:Nick().." is spectator or alive!")
  9.         end
  10.     end
  11.    
  12.     for k,v in pairs(affected_plys) do
  13.         v:SetPData("SpawnAllow","true")
  14.         v:Spawn()
  15.     end
  16.  
  17.  
  18. ulx.fancyLogAdmin( calling_ply,  "#A возродил #T", affected_plys)
  19.  
  20. end
  21. local respawn = ulx.command("Команады Тюрьмы", "ulx respawn", ulx.respawn, {"!respawn","!rs"},true)
  22. respawn:addParam{ type=ULib.cmds.PlayersArg }
  23. respawn:defaultAccess( ULib.ACCESS_SUPERADMIN )
  24. respawn:help( "Возродить игрока" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement