30.09.2016, 20:06
You just need to add two lines which set the player's position and the angle when player spawns in injured state as the position and angle of the player gets saved when the player dies.
Like this:
So you add them here under OnPlayerSpawn to this part:
Like this:
Код:
SetPlayerPos(playerid, PlayerData[playerid][pPos][0], PlayerData[playerid][pPos][1], PlayerData[playerid][pPos][2]); SetPlayerFacingAngle(playerid, PlayerData[playerid][pPos][3]);
Код:
if (PlayerData[playerid][pInjured]) { SetPlayerPos(playerid, PlayerData[playerid][pPos][0], PlayerData[playerid][pPos][1], PlayerData[playerid][pPos][2]); SetPlayerFacingAngle(playerid, PlayerData[playerid][pPos][3]); ShowHungerTextdraw(playerid, 0); TextDrawShowForPlayer(playerid, gServerTextdraws[2]); SendClientMessage(playerid, COLOR_LIGHTRED, "[WARNING]:{FFFFFF} You are injured and require medical attention (/call 911)."); ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1); ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 0, 0, 0, 1, 0, 1); }