Player Death
#7

I have done this
but, when my HP is 5 and 4, it doesnt work.. I want it when your HP is 5, it does the animation, and then keeps hp at 5/4.. It doesnt work
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerConnected(playerid))
    {
    new Float:health;
    new sendername[MAX_PLAYER_NAME];
    new string[256];
        if(GetPlayerHealth(playerid, health) == 5)
        {
//          PlayerInfo[playerid][pLocal] = 255;
            SendClientMessage(playerid, COLOR_YELLOW, "Please wait for a Ambulance to arrive");
            TogglePlayerControllable(playerid, 0);
            ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 0, 0, 0, 0, 0);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "** %s is in need of a Medic. (use /accept medic to accept the call)", sendername);
            SendJobMessage(11, TEAM_AZTECAS_COLOR, string);
            MedicCall = playerid;
            return 1;
        }
        return 1;
        }
        if(SetPlayerHealth(playerid, 4))
        {
            return 1;
        }
        return 1;
}
Reply


Messages In This Thread
Player Death - by acade - 17.02.2009, 15:16
Re: Player Death - by Joe Staff - 17.02.2009, 15:18
Re: Player Death - by acade - 17.02.2009, 15:22
Re: Player Death - by Joe Staff - 17.02.2009, 15:27
Re: Player Death - by acade - 17.02.2009, 16:05
Re: Player Death - by acade - 17.02.2009, 18:05
Re: Player Death - by acade - 20.02.2009, 15:35
Re: Player Death - by Jefff - 20.02.2009, 17:29
Re: Player Death - by acade - 20.02.2009, 21:25

Forum Jump:


Users browsing this thread: 2 Guest(s)