08.08.2012, 05:04
This would be the code stripped of the messages...
As for your code, it won't work. Mine is doing the same thing in the end. Just put that loop under a 5 Minute timer or something like that. Depends on how fast you want hunger to go down.
I am going to be going to bed, so I am unavailable for further assistance sorry I have to be up in 4 hours for work.
pawn Код:
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid, health);
if(GetProgressBarValue(hungry[playerid]) > 0)
{
SetProgressBarValue(hungry[playerid], GetProgressBarValue(hungry[playerid]) - 1)
}
else
{
SetPlayerHealth(playerid, health-5);
}
}
}
I am going to be going to bed, so I am unavailable for further assistance sorry I have to be up in 4 hours for work.