14.09.2015, 02:27
well when a player dies it never does the animation it only makes them stand-up i have got the anim to work once before but it was only for the player, aswell when a player gets killed they tp to the airport then to the death spot, i want them to fall right away as they die.
here is my system,
here is my system,
Код:
public OnPlayerDeath(playerid, killerid, reason) { SetNormalColor(playerid); ResetVariables(playerid); FullResetPlayerWeapons(playerid); FullResetPlayerClothes(playerid); CheckPlayerCurrentCall(playerid); RemovePlayerMask(playerid); OnAnim{playerid} = true; ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); if(!isAdminDuty(playerid)) { MakePlayerWounded(playerid); } SetHunger(playerid, 100.0); return 1; }
Код:
stock MakePlayerWounded(playerid) { if(PlayerInfo[playerid][pJailed] == 0) { SetIntVar(playerid, "JustDied", 1); SavePlayerPos(playerid); } return 1; }
Код:
public CheckWounded(playerid) { if(GetIntVar(playerid, "JustDied") == 1) { ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); ApplyAnimation(playerid,"WUZI","CS_Dead_Guy",4.1,0,1,1,1,1); PutPlayer(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetInterior(playerid, PlayerInfo[playerid][pInt]); SetWorld(playerid, PlayerInfo[playerid][pWorld]); SetPlayerCameraPos(playerid,PlayerInfo[playerid][pPosX]+3,PlayerInfo[playerid][pPosY]+3,PlayerInfo[playerid][pPosZ]+3); SetPlayerCameraLookAt(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetPlayerHealth(playerid, 25.0); GiveCash(playerid, -500); GameTextForPlayer(playerid, "~b~Brutally Wounded", 5000, 3); SCM(playerid, COLOR_PINK, "EMT: Your Medical Bills are $500"); SCM(playerid, COLOR_LIGHTRED, "You are Brutally Wounded. If a medic or anyone else doesn't save you, you will die."); SCM(playerid, COLOR_LIGHTRED, "To accept death type /acceptdeath"); FreezePlayer(playerid); } }