if (IsDead[playerid] == 1) {
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
TogglePlayerControllable(playerid,0);
SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
SetPlayerCameraLookAt(playerid, -830.8118,-1360.3612,87.0289);
SendClientMessage(playerid,COLOR_WHITE,"INFO: Type /acceptdeath to leave this position.");
ApplyAnimationEx(playerid, "PARACHUTE", "FALL_skyDive_DIE", 4.0, 0, 1, 1, 1, -1);
SetPVarInt(playerid, "Suitcase",0);
return 1;
}
new Float:DeathPosX[MAX_PLAYERS]; new Float:DeathPosY[MAX_PLAYERS]; new Float:DeathPosZ[MAX_PLAYERS]; new IsDead[MAX_PLAYERS]; Top of my script.
IsDead[playerid] = 1;
new Float:fPosX, Float:fPosY, Float:fPosZ;
GetPlayerPos(playerid, fPosX, fPosY, fPosZ);
DeathPosX[playerid] = fPosX;
DeathPosY[playerid] = fPosY;
DeathPosZ[playerid] = fPosZ;
|
Put this under OnPlayerDeath:
pawn Код:
|