24.03.2012, 14:43
Try using this:
Add this on top of your script
Now let's get onto the main work
Hopefully this helped you.
Add this on top of your script
pawn Код:
new playerDeath[MAX_PLAYERS];
Now let's get onto the main work
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
playerDeath[playerid] = 1; // This is saying that the player died.
return 1;
}
pawn Код:
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;
}
Hopefully this helped you.