Hunger System - TextDraw bug.
#5

Ohyea, fuck I'm dumb hahah :$

pawn Код:
forward HungryLost();
public HungryLost() // Must be a public.
{
    for(new i; i<MAX_PLAYERS; i++) // Loop for all players
    {
       new TDstring[150];
       format(TDstring, sizeof(TDstring), "Hunger: %d", hunger[i]);

       new Float:Health;
       GetPlayerHealth(i, Health);
       if(!aDuty[i] && !mDuty[i])
       {
        if(PlayerInfo[i][pHunger] >= 1)
        {
        PlayerInfo[i][pHunger] --;
        TextDrawSetString(hunger[i], TDstring);
        }
        else
        {
        SetPlayerHealth(i,Health-5);
        PlayerInfo[i][pHungry] = 1;
        PlayerInfo[i][pHunger] = 0;
        TextDrawSetString(hunger[i], TDstring);
        }
       }
    }
    return 1;
}
Reply


Messages In This Thread
Hunger System - TextDraw bug. - by faff - 07.06.2013, 10:44
Re: Hunger System - TextDraw bug. - by faff - 07.06.2013, 12:11
Re: Hunger System - TextDraw bug. - by Tingesport - 07.06.2013, 13:01
Re: Hunger System - TextDraw bug. - by faff - 07.06.2013, 13:03
Re: Hunger System - TextDraw bug. - by Tingesport - 07.06.2013, 13:16
Re: Hunger System - TextDraw bug. - by faff - 07.06.2013, 14:06

Forum Jump:


Users browsing this thread: 1 Guest(s)