Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. deathwait = 45;
  2.  
  3. function deathwaitst(ply, wep, killer)
  4. ply.deathtime = 0;
  5. ply.nextsecond = CurTime() + 1;
  6. end
  7. hook.Add("PlayerDeath", "forcewait", deathwaitst)
  8.  
  9. function force( ply )
  10. if (ply:KeyPressed(IN_ATTACK) || ply:KeyPressed(IN_ATTACK2) || ply:KeyPressed(IN_JUMP)) then return false
  11. end
  12. if (CurTime() > ply.nextsecond) then
  13. if (ply.deathtime < deathwait) then
  14. ply.deathtime = ply.deathtime + 1;
  15. ply.nextsecond = CurTime() + 1;
  16. else
  17. ply.deathtime = nil;
  18. ply.nextsecond = nil;
  19. ply:Spawn()
  20. end
  21. end
  22. end
  23. hook.Add("PlayerDeathThink", "forceing", force)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement