new STG[64], PegarIP[16];
GetPlayerIp(playerid, PegarIP, 16);
format(STG, 64, "InfoJogadores/IPs/%s.ini", PegarIP);
if(!DOF2_FileExists(STG))
{
DOF2_CreateFile(STG);
DOF2_SetString(STG, "Conta", Nome_Conta(playerid));
DOF2_SaveFile();
}
else
{
DOF2_SetString(STG, "Conta1", Nome_Conta(playerid));
DOF2_SaveFile();
}
else
{
DOF2_SetString(STG, "Conta2", Nome_Conta(playerid));
DOF2_SaveFile();
}
else
{
DOF2_SetString(STG, "Conta3", Nome_Conta(playerid));
DOF2_SaveFile();
}
else
{
DOF2_SetString(STG, "Conta4", Nome_Conta(playerid));
DOF2_SaveFile();
}
else
{
DOF2_SetString(STG, "Conta5", Nome_Conta(playerid));
DOF2_SaveFile();
}
new STG[64], PegarIP[16];
GetPlayerIp(playerid, PegarIP, 16);
format(STG, 64, "InfoJogadores/IPs/%s.ini", PegarIP);
if(!DOF2_FileExists(STG)) {
DOF2_CreateFile(STG);
}
else {
DOF2_SetString(STG, "Conta", Nome_Conta(playerid));
DOF2_SetString(STG, "Conta1", Nome_Conta(playerid));
DOF2_SetString(STG, "Conta2", Nome_Conta(playerid));
DOF2_SetString(STG, "Conta3", Nome_Conta(playerid));
DOF2_SetString(STG, "Conta4", Nome_Conta(playerid));
DOF2_SetString(STG, "Conta5", Nome_Conta(playerid));
DOF2_SaveFile();
}
Para de ser burro e usa a cabeзa!
PHP код:
|
Vocк viu o modo que vocк estava fazendo?
Jб falei... Usa https://sampwiki.blast.hk/wiki/File_Functions ou entгo pesquise sobre que vocк acha... |
stock SalvarConta(playerid){
new
bool: sucess = false,
pSTR[70],
pIP[16]
;
GetPlayerIp(playerid, pIP, 16);
format(pSTR, 70, "InfoJogadores/IPs/%s.ini", pIP);
{
static
i, n, vSTR[16]
;
// Criamos um arquivo para percorrer contas de 0 а 1.
for(i = 0, n = 5; i ^ n; ++i){
// Formatamos a string..
format(vSTR, 16, "Conta%d", i);
// Verificamos se a string "vSTR" estб no arquivo "pSTR".
// Caso nгo estiver, salva o nome do jogador.
if(!DOF2_IsSet(pSTR, vSTR)){
DOF2_SetString(pSTR, vSTR, pIP);
sucess = true;
break;
}
}
}
return sucess;
}