12.05.2013, 12:54
Hey, i have really big problem. I have Brutally Wounded system (BW), and when someone dies, he is placed in same place and he can use /acceptdeath to go to the hospital. But when someone dies in interior, he falls from the sky, maybe because he spawns at interior 0 and wrong VW. How to fix that?
Some of my code:
Some of my code:
pawn Код:
new Float:DeathPosX [MAX_PLAYERS];
new Float:DeathPosY [MAX_PLAYERS];
new Float:DeathPosZ [MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid)
{
IsAfterLifing[playerid] = 0;
if (IsDead[playerid] == 1)
{
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]+5);
SetPlayerCameraLookAt(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
TogglePlayerControllable(playerid,false);
ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE", 4.0, 0, 0, 0, 1, 0);
SetTimerEx("AutoDeath",AUTODEATH_SECONDS * 1000,false,"i",playerid);
SCM(playerid,WHITE,"You are now laying death. You are bleeding to death.");
SCM(playerid,WHITE,"You can type /acceptdeath, if no medics are available.");
SCM(playerid,WHITE,"It will take you to hospital.");
return 1;
}
return 1;
}