public OnPlayerDeath(playerid, killerid, reason)
{
ApplyAnimation(playerid,"MEDIC","CPR",1.1,1,0,0,1,30000,1);//Modify it as you want, this is an animation,
return 1;
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, 2034.1534,-1402.6010,17.2946); // 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;
}
public OnPlayerDeath(playerid, killerid, reason)
{
ApplyAnimation(playerid,"MEDIC","CPR",1.1,1,0,0,1,30000,1);//Modify it as you want, this is an animation,
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, 2034.1534,-1402.6010,17.2946); // Replace X, Y, and Z With the Hospital Co-ords.
playerDeath[playerid] = 0; // This is saying the player is not dead.
}
return 1;
}
|
Remove the ApplyAnimation line and try to compile it then...
I think it is impossible to apply an animation when someone has died. |