06.01.2015, 18:45
pawn Код:
new Died[MAX_PLAYERS];
enum pInfo
{
Float:pX,
Float:pY,
Float:pZ
}
new DeathPosition[MAX_PLAYERS][pInfo];
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
DeathPosition[playerid][pX] = X;
DeathPosition[playerid][pY] = Y;
DeathPosition[playerid][pZ] = Z;
Died[playerid] = 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Died[playerid] == 1)
{
SetPlayerPos(playerid, DeathPosition[playerid][pX], DeathPosition[playerid][pY], DeathPosition[playerid][pZ]);
}
return 1;
}