26.12.2014, 11:47
pawn Код:
enum dInfo
{
Float:dX,
Float:dY,
Float:dZ
}
new DeathInfo[MAX_PLAYERS][dInfo];
new Death[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
DeathInfo[playerid][dX] = X;
DeathInfo[playerid][dY] = Y;
DeathInfo[playerid][dZ] = Z;
Death[playerid] = 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Death[playerid] == 1)
{
SetPlayerPos(playerid, DeathInfo[playerid][dX], DeathInfo[playerid][dY], DeathInfo[playerid][dZ]);
Death[playerid] = 0;
}
return 1;
}