[Ajuda]Stock Salvar Prof
#1

pawn Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}

stock SalvarProfissao(playerid, prof)
{
    new arquivo, string[128];
    format(string, sizeof(string), "\Users\%s.ini", PlayerName(playerid));
    if(fexist(string))
    {
        arquivo = fopen(string);
        new string2;
        format(string2, sizeof(string2), "Prof", gTeam[playerid]);
        fwrite(arquivo, string2);
        fclose(arquivo);
    }
    return 1;
}
ESTA CORRETO ??
Reply
#2

Poste os erros que estao dando..


pawn Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}

stock SalvarProfissao(playerid)
{
    new arquivo, string[128];
    format(string, sizeof(string), "\Users\%s.ini", PlayerName(playerid));
    if(fexist(string))
    {
        arquivo = fopen(string);
       
        format(string2, sizeof(string), "Profissao %s", gTeam[playerid]);
        fwrite(arquivo, string);
        fclose(arquivo);
    }
    return 1;
}
tenta
Reply
#3

talvez ocorra um erro na hora de registrar olhe:
Код:
\Users\%s.ini
Eu acho que й assim:
pawn Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}

stock SalvarProfissao(playerid)
{
    new arquivo, Conta[MAX_PLAYER_NAME+15], string[64];
    format(Conta, sizeof(Conta), "Users\%s.ini", PlayerName(playerid));
    if(fexist(Conta))
    {
        arquivo = fopen(Conta);
       
        format(string, sizeof(string), "Profissao=%d/n", gTeam[playerid]); fwrite(arquivo, string);
        fclose(arquivo);
    }
    return 1;
}
OBS: Eu nгo tenho certeza xD
Reply
#4

Obrigado, pode dar Closes : )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)