Returning to Last Position When Dying
#1

Could some write a quick example of how I would teleport someone back to the location where they last were before they died?
Reply
#2

pawn Код:
new float:X[MAX_PLAYERS], Float:Y[MAX_PLAYERS], float:Z[MAX_PLAYERS], dead[MAX_PLAYERS];
OnPLayerDeath
{
     GetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]);
     dead[playerid] = 1;
return 1;
}
OnPlayerSpawn
{
  if(dead[playerid] = 1)
  {
    SetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]);
    dead[playerid] = 0;
   }
 return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)