Hungry SYstem Help
#1

how to provide health -5 player, when he was hungry at 5%?
pls.. help me


THIS CODE DONT WORK! WHY?

PHP код:
for(new playeridplayerid MAX_PLAYERSplayerid++)
    {
        new 
Float:health;
        
GetPlayerHealth(playeridhealth);
        new 
HungryTime SetPlayerHealth(playeridhealth-5);
        if(
GetProgressBarValue(hungry[playerid]) <= 0)
        {
            
SetTimer("HungryTime"300001);
            
SendClientMessage(playeridCOLOR_BLUE"You Are Hungry Now, Go To The Restaurant To Eat Some Food");
            
SendClientMessage(playeridCOLOR_BLUE"If You're Not Going To Eat, You Will Lose Your Health Every 30 Seconds");
        }
        if(
GetProgressBarValue(hungry[playerid]) <= 0)
        {
            
SetProgressBarValue(hungry[playerid], 0);
        }
        if(
GetProgressBarValue(hungry[playerid]) > 0)
        {
            
KillTimer(HungryTime);
        }
    }
    
Hungry TextDrawCreate(43.000000147.000000"ENERGY");
    
TextDrawBackgroundColor(Hungry, -1);
    
TextDrawFont(Hungry1);
    
TextDrawLetterSize(Hungry0.9188882.398888);
    
TextDrawColor(Hungry, -16776961);
    
TextDrawSetOutline(Hungry1);
    
TextDrawSetProportional(Hungry1);
    
TextDrawTextSize(Hungry130.000000750.000000); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)