04.09.2012, 19:28
Spawn at farm after death?
Problem: When you're dying you suppose to spawn where you died but now it's spawning at the Red County farm.
OnPlayerDeath =
Код:
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;