24.12.2011, 00:53
Could some write a quick example of how I would teleport someone back to the location where they last were before they died?
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;
}