My knowledge of lua aren't good enough to understand what is wrong. So, if i spawn, spawn protect works and i can't die. But if there are two players or more, one player (which spawn first) stops being protection and the second player is still protected.
Here is script:
[CODE]
Nothing now :P
[/CODE]
Instead of timer.Create, use timer.Simple.
[code]timer.Simple( 5, function( ) removeSP( ply ) end )[/code]
Each time a player spawns, you are overwriting the previous timer with the new one, so a recently spawned player ends up immortal.
[QUOTE=Kogitsune;45649600]Instead of timer.Create, use timer.Simple.
[code]timer.Simple( 5, function( ) removeSP( ply ) end )[/code]
Each time a player spawns, you are overwriting the previous timer with the new one, so a recently spawned player ends up immortal.[/QUOTE]
That works, thank you.
Sorry, you need to Log In to post a reply to this thread.