28.03.2010, 19:54
pawn Код:
new
playerSpawn[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(playerSpawn[playerid] == 0)
{
// first spawn.
playerSpawn[playerid] = 1; // player was spawned for the first time, now we'll set the variable to true.
}
else
{
// it's not his first spawn.
}
return true;
}
public OnPlayerDisconnect(playerid, reason)
{
playerSpawn[playerid] = 0; // reset the variable when player disconnects.
return true;
}