06.01.2015, 18:48
pawn Код:
new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], PosZ[MAX_PLAYERS]; //to save players location
new died[MAX_PLAYERS]; //confirming he's dead
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
died[playerid] = 1; //he's dead
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]); //get his position now
return 1;
}
pawn Код:
if(died[playerid] == 1) //if he's dead
{
died[playerid] = 0; //dead reset
SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]); //set his position back to where he was on respawn
// Apply your animation here and more codes
}
return 1;
}