24.01.2017, 00:19
Hello!
I'm making a RP server and I'm making the death system. At these point I have done a system that works something like this:
1. Death - > OnPlayerDeath sets variable Death[playerid] to 1.
2. OnPlayerSpawn -> if(Death[playerid]) -> Apply animation etc.
What I want to do is not respawn the player if he deaths. I need to avoid the default death system of SAMP so, when player life arrives 0 or minus (I suppose if I have 6hp and someone shots me, my life will not 0, will be -10 or something like this) automatically the player enters on the death mode, without respawn and with full life.
If someone can give me an example it will be apreciated. Thanks!
I'm making a RP server and I'm making the death system. At these point I have done a system that works something like this:
1. Death - > OnPlayerDeath sets variable Death[playerid] to 1.
2. OnPlayerSpawn -> if(Death[playerid]) -> Apply animation etc.
What I want to do is not respawn the player if he deaths. I need to avoid the default death system of SAMP so, when player life arrives 0 or minus (I suppose if I have 6hp and someone shots me, my life will not 0, will be -10 or something like this) automatically the player enters on the death mode, without respawn and with full life.
If someone can give me an example it will be apreciated. Thanks!