Why isn't this code working?
#1

<What coding at 2am does to you (removed)>
Reply
#2

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;

Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)