[Ajuda] Por quк nгo cria o arquivo na pasta?
#1

Toda vez que eu me conectar ele tem que criar o arquivo, porйm nгo estб acontecendo isso, queria entender o porque do meu FS nгo criar o arquivo na pasta, a pasta Scores existe em scripfiles.

pawn Код:
#include <a_samp>
#include <zcmd>
#include <DOF2>

#define DialogClasses 8769
new arquivo[80], sendername[MAX_PLAYER_NAME];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("            teste                       ");
    print("--------------------------------------\n");
    return 1;
}


public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(arquivo, sizeof(arquivo), "Scores/%s.ini", sendername);
    if(DOF2_FileExists(arquivo)){
        SetPlayerScore(playerid, DOF2_GetInt(arquivo, "Score"));
    } else{
        DOF2_CreateFile(arquivo);
        DOF2_SetInt(arquivo, "Score", 0);
        DOF2_SetString(arquivo, "Classe", "Nenhuma");
        DOF2_SaveFile();
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(arquivo, sizeof(arquivo), "Scores/%s.ini", sendername);
    DOF2_SetInt(arquivo,"Score", GetPlayerScore(playerid));
    DOF2_SaveFile();
    return 1;
}
Reply


Messages In This Thread
Por quк nгo cria o arquivo na pasta? - by viniciussvl - 04.02.2017, 18:20
Re: Por quк nгo cria o arquivo na pasta? - by viniciussvl - 04.02.2017, 19:12
Re: Por quк nгo cria o arquivo na pasta? - by viniciussvl - 04.02.2017, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)