22.02.2012, 18:12
pawn Код:
new bool:JustDied[MAX_PLAYERS]=false;
public OnPlayerSpawn(playerid)
{
if(JustDied[playerid] == true)
{
new Float:Hosp1 = GetPlayerDistanceFromPoint(playerid, X, Y, Z),
Float:Hosp2 = GetPlayerDistanceFromPoint(playerid, X, Y, Z);
if(Hosp1 > Hosp2)
{
//set their pos to hosp 2
}
else
{
//set their pos to hosp 1
}
JustDied[playerid] = false;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
JustDied[playerid] = true;
return 1;
}