12.03.2012, 17:21
Might be an idea to set HasDied[playerid] = 0; under the SetPlayerPos bit in OnPlayerSpawn and under OnPlayerConnect HasDied[playerid] = 0; just to ensure nothing goes wrong.
pawn Code:
// Top of script
new HasDied[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
HasDied[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(HasDied[playerid] == 1)
{
SetPlayerPos(..
SetPlayerFacingAngle(..
HasDied[playerid] = 0;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
HasDied[playerid] = 1;
return 1;
}