Why isn't this code working?
#3

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Why not?

PHP код:
new
    
healTimer
;
public 
OnGameModeInit()
{
    
healTimer SetTimer("healHealers"5000true);
    return 
1;
}
forward healHealers();
public 
healHealers()
{
    foreach (new 
Player)
    {
        if(
PlayerSkill[i] == Healer)
        {
            new
                
Float:playerHealth
            
;
            
GetPlayerHealth(iplayerHealth);
            if((
playerHealth 5) < 100)
            {
                
SetPlayerHealth(iplayerHealth 5);
            }
        }
    }
    return 
1;

That seems way more efficient thank you.
Reply


Messages In This Thread
Why isn't this code working? - by Pawnify - 12.07.2015, 10:09
Re: Why isn't this code working? - by ]Rafaellos[ - 12.07.2015, 10:16
Re: Why isn't this code working? - by Pawnify - 17.07.2015, 14:09

Forum Jump:


Users browsing this thread: 2 Guest(s)