23.06.2013, 19:35
I have not tested this, but it should work.
Add this on top of the script, but below the includes
Add this in the callback OnPlayerConnect
Add this in the callback OnPlayerDeath
And finally, add this in the callback OnPlayerSpawn
Add this on top of the script, but below the includes
pawn Код:
new Float:DeathPosX[MAX_PLAYERS];
new Float:DeathPosY[MAX_PLAYERS];
new Float:DeathPosZ[MAX_PLAYERS];
new Died[MAX_PLAYERS];
pawn Код:
Died[playerid] = 0;
pawn Код:
GetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
Died[playerid] = 1;
pawn Код:
if(Died[playerid] == 1)
{
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
Died[playerid] = 0;
}