Injury system, not working, OnPlayerTakeDamage.
#1

Nothing happens until the player reaches 0 hp.
pawn Код:
if(LoggedIn[playerid] == 1 && Health <= 35 && KnockedOut[playerid] == 0 && GetPlayerState(playerid) != 9)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            RemovePlayerFromVehicle(playerid);
            ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0,1);
            TogglePlayerControllable(playerid, 0);
        }
            KnockedOut[playerid] = 1;
        TogglePlayerControllable(playerid, 0);
            ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0,1);
        SendClientMessage(playerid, COLOUR_REALRED, "You have been knocked out, unless someone revives you, you may die.");
        format(string, sizeof(string), "* %s has lost consciousness due to their injuries *", GetNameEx(playerid));
        ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
        return 1;
    }
Under OnPlayerTakeDamage.
Reply


Messages In This Thread
Injury system, not working, OnPlayerTakeDamage. - by Dokins - 15.09.2016, 18:43
Re: Injury system, not working, OnPlayerTakeDamage. - by GoldenLion - 15.09.2016, 18:49
Re: Injury system, not working, OnPlayerTakeDamage. - by Dokins - 15.09.2016, 18:52
Re: Injury system, not working, OnPlayerTakeDamage. - by Shinja - 15.09.2016, 23:04

Forum Jump:


Users browsing this thread: 1 Guest(s)