[Ajuda] Level
#2

Meio contraditуrio . "SetTimer" utilizando uma call back com o parвmetro.
https://sampwiki.blast.hk/wiki/SetTimer

@edit
PHP код:
enum players
{
    
experiencia,
    
level,
    
bool:AFK,
};
new 
PlayerInfo[MAX_PLAYERS][players];
new 
loopExperiencia;
public 
OnGameModeInit()
{
    
loopExperiencia SetTimer("GanharExp"3000001);
    return 
1;
}
forward GanharExp();
public 
GanharExp()
{
    for (new 
iMAX_PLAYERS; ++i)
    {
        if ( !
IsPlayerConnected(i) || PlayerInfo[i][AFK])continue;
        ++
PlayerInfo[i][experiencia];
        if ( 
PlayerInfo[i][experiencia] > 4)
        {
            
PlayerInfo[i][experiencia] = 0;
            ++
PlayerInfo[i][level];
        }
    }
    return 
1;
}
OBS20 minutos +nivel 
Reply


Messages In This Thread
Level - by SnowBorn - 12.11.2017, 10:49
Re: Level - by BykiLler - 12.11.2017, 13:18
Re: Level - by SammyJ - 12.11.2017, 14:22
Re: Level - by SnowBorn - 12.11.2017, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)