[AJUDA] Sistema de UP
#6

Allan, vai ai algumas dicas:
Tenta criar um tempo de up para cada player usando ex: Segundo[MAX_PLAYERS], Minuto[MAX_PLAYERS]...
Deixa o codigo de salvar no aquivo somente em algum tipo de stock "Salvardados(playerid)" ou outra.
Arrumar mais o seu codigo para nгo dar ideia pro lag ou ate mesmo pesar o seu script entende.

Estou sem tempo pra fazer o codigo completo mas tenho aqui no HD um tipo de LevelUp feito por mim mas nгo testei nem compilei entгo pode ser que tenha bugs. Espero que isto sirva como base.
PHP код:
public GanharLevel(playerid)
{
    if (
PlayerInfo[playerid][LSegundo] < 60)
    {
        
PlayerInfo[playerid][LSegundo] ++;
        return 
1;
    }
    else if (
PlayerInfo[playerid][LSegundo] == 60)
    {
        
PlayerInfo[playerid][LSegundo] = 0;
        
PlayerInfo[playerid][LMinuto] ++;
        if (
PlayerInfo[playerid][LMinuto] == 60)
        {
            
PlayerInfo[playerid][LMinuto] = 0;
            
PlayerInfo[playerid][LHora] ++;
        }
        if (
PlayerInfo[playerid][LHora] == 2)
        {
            
PlayerInfo[playerid][Level] ++;
            
PlayerInfo[playerid][LHora] = 0;
            
SendClientMessage(playeridMSG_INFO"Vocк ganhou um level. Up, up.");
        }
    }
    return 
1;

Obs: Nгo sei se funciona, nгo testei e nem compilei mas vocк pode tentar!
Reply


Messages In This Thread
[AJUDA] Sistema de UP - by Allanrokeiro - 15.01.2012, 17:40
Re: [AJUDA] Sistema de UP - by Gui_Mendes - 15.01.2012, 20:05
Re: [AJUDA] Sistema de UP - by Allanrokeiro - 15.01.2012, 20:10
Re: [AJUDA] Sistema de UP - by Gui_Mendes - 15.01.2012, 20:20
Re: [AJUDA] Sistema de UP - by Allanrokeiro - 15.01.2012, 20:23
Re: [AJUDA] Sistema de UP - by Sergiinhonike - 15.01.2012, 21:11
Re: [AJUDA] Sistema de UP - by dPlaYer_ - 15.01.2012, 21:12
Re: [AJUDA] Sistema de UP - by Allanrokeiro - 16.01.2012, 00:42
Re: [AJUDA] Sistema de UP - by dPlaYer_ - 17.01.2012, 23:57
Re: [AJUDA] Sistema de UP - by Allanrokeiro - 18.01.2012, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)