Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- deathwait = 45;
- function deathwaitst(ply, wep, killer)
- ply.deathtime = 0;
- ply.nextsecond = CurTime() + 1;
- end
- hook.Add("PlayerDeath", "forcewait", deathwaitst)
- function force( ply )
- if (ply:KeyPressed(IN_ATTACK) || ply:KeyPressed(IN_ATTACK2) || ply:KeyPressed(IN_JUMP)) then return false
- end
- if (CurTime() > ply.nextsecond) then
- if (ply.deathtime < deathwait) then
- ply.deathtime = ply.deathtime + 1;
- ply.nextsecond = CurTime() + 1;
- else
- ply.deathtime = nil;
- ply.nextsecond = nil;
- ply:Spawn()
- end
- end
- end
- hook.Add("PlayerDeathThink", "forceing", force)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement