Afterlife bug.
#1

Spawn at farm after death?

Код:
    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;
    }
Problem: When you're dying you suppose to spawn where you died but now it's spawning at the Red County farm.

Код:
new Float:DeathPosX[MAX_PLAYERS];
new Float:DeathPosY[MAX_PLAYERS];
new Float:DeathPosZ[MAX_PLAYERS];
new IsDead[MAX_PLAYERS];
Top of my script.
OnPlayerDeath =
Код:
IsDead[playerid] = 1;
Reply
#2

Put this under OnPlayerDeath:

pawn Код:
new Float:fPosX, Float:fPosY, Float:fPosZ;
GetPlayerPos(playerid, fPosX, fPosY, fPosZ);
DeathPosX[playerid] = fPosX;
DeathPosY[playerid] = fPosY;
DeathPosZ[playerid] = fPosZ;
Reply
#3

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Put this under OnPlayerDeath:

pawn Код:
new Float:fPosX, Float:fPosY, Float:fPosZ;
GetPlayerPos(playerid, fPosX, fPosY, fPosZ);
DeathPosX[playerid] = fPosX;
DeathPosY[playerid] = fPosY;
DeathPosZ[playerid] = fPosZ;
Thank you worked.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)