27.02.2010, 19:53
pawn Код:
new
bool:playerDied[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
playerDied[playerid] = true;
return true;
}
public OnPlayerSpawn(playerid)
{
if(playerDied[playerid] == true)
{
// set his position to the hospital.
playerDied[playerid] = false; // reset the variable.
}
return true;
}
public OnPlayerDisconnect(playerid, reason)
{
playerDied[playerid] = false; // reset the variable.
return true;
}