SA-MP Forums Archive
[Ajuda] recorde online - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] recorde online (/showthread.php?tid=386273)



recorde online - VenoN - 19.10.2012

Boa Noite, Gente estou com um pequeno problema nesse script qual o problema

ele estб em dof meu gm й Dini alguem pode me ajudar a passar pra Dini

pawn Код:
//comeзo do GM
#define RECORD_ONLINE     "/GM/arquivos/Record.cfg"
new Recorde;
new Online;

// No OnGameModeInit

    if(DOF2_FileExists(RECORD_ONLINE))
        Recorde = DOF2_GetInt(RECORD_ONLINE, "RecordeJogadores");
    else
    {
        DOF2_CreateFile(RECORD_ONLINE);
        DOF2_SetInt(RECORD_ONLINE, "RecordeJogadores", 0);
        Recorde = 0;
    }

// No OnPlayerDisconnect
    Online--;
// No OnPlayerConnect
    Online++;
    if(Online > Recorde)
    {
        Recorde = Online;
        DOF2_SetInt(RECORD_ONLINE, "RecordeJogadores", Recorde);
        format(string, sizeof(string),"O Recorde de jogadores online й: %d", Recorde);
        SendClientMessageToAll(COLOR_YELLOW,string);
    }



Re: recorde online - Q.I - 20.10.2012

tenta
PHP код:
//comeзo do GM

#define RECORD_ONLINE     "/GM/arquivos/Record.cfg"
new Recorde;
new 
Online;

// No OnGameModeInit

    
if(dini_Exists(RECORD_ONLINE))
        
Recorde dini_Int(RECORD_ONLINE"RecordeJogadores");
    else
    {
        
dini_Create(RECORD_ONLINE);
        
dini_IntSet(RECORD_ONLINE"RecordeJogadores"0);
        
Recorde 0;
    }

// No OnPlayerDisconnect
    
Online--;
// No OnPlayerConnect
    
Online++;
    if(
Online Recorde)
    {
        
Recorde Online;
        
dini_IntSet(RECORD_ONLINE"RecordeJogadores"Recorde);
        
format(stringsizeof(string),"O Recorde de jogadores online й: %d"Recorde);
        
SendClientMessageToAll(COLOR_YELLOW,string);
    } 



Re: recorde online - VenoN - 20.10.2012

aaaa lek se й mt zika dof й um ____ memo vlw + rep


Re: recorde online - Maklister - 20.10.2012

Caso tenha mais dъvidas sobre DOF2 - DINI

Use:

PHP код:
dini_Exists             DOF2_FileExists
dini_Remove             DOF2_RemoveFile
dini_Create             DOF2_CreateFile
dini_Set                DOF2_SetString
dini_Get                DOF2_GetString
dini_IntSet             DOF2_SetInt
dini_Int                DOF2_GetInt
dini_BoolSet            DOF2_SetBool
dini_Bool               DOF2_GetBool
dini_FloatSet           DOF2_SetFloat
dini_Float              DOF2_GetFloat
dini_Unset              DOF2_Unset
dini_Isset              DOF2_IsSet 



Re: recorde online - zSuYaNw - 20.10.2012

DOF ja tem conversor de dini para dof ou vice-versa.