Advertisement
PlayersZero

Gmod Respawn Command

Jan 28th, 2019
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local vec = Vector(math.random(0,255), math.random(0,255), math.random(0,255))
  2. local CATEGORY_NAME = "Essentials"
  3.  
  4. function ulx.respawn( calling_ply, target_ply )
  5.     if not target_ply:Alive() then
  6.         target_ply:SetTeam(2)
  7.         target_ply:Spawn()
  8.         target_ply:SetPlayerColor(vec)
  9.         target_ply:GenerateBystanderName()
  10.         ulx.fancyLogAdmin(calling_ply, false, "#A respawned #T", target_ply)
  11.     end
  12. end
  13.  
  14. local respawn = ulx.command(CATEGORY_NAME, "ulx respawn", ulx.respawn, "!respawn", false)
  15. respawn:addParam({type = ULib.cmds.PlayerArg})
  16. respawn:defaultAccess(ULib.ACCESS_ADMIN)
  17. respawn:help("Respawns a dead player")
  18. //For murder only
  19. //Made by Zero
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement