24.03.2012, 10:11
y make a Hospital system now when y die y not spawn in the hospital(y Set to spawn on Hospital) it's spawn again in civil but the script is running the player is not moving in the civil spawn when he die wtf is ?
new playerDeath[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
playerDeath[playerid] = 1; // This is saying that the player died.
return 1;
}
public OnPlayerSpawn(playerid)
{
if(playerDeath[playerid] == 1) // This is checking if the player had died previously
{
SetPlayerPos(playerid, X, Y, Z); // Replace X, Y, and Z With the Hospital Co-ords.
playerDeath[playerid] = 0; // This is saying the player is not dead.
return 1;
}
return 1;
}