10.02.2015, 21:58
I enter the server, I / register, it creates a file with the level 0, I soon caught on and rcon admin level 3, and the save file is still at level 0
already have:
Thanks!
already have:
pawn Код:
stock rSalvar(playerid)
{
new Arquivos[50];
format(Arquivos, sizeof Arquivos, rRegistrados, rNome(playerid));
if (DOF2_FileExists(Arquivos))
{
DOF2_SetInt(Arquivos, "Skin", GetPlayerSkin(playerid));
DOF2_SetInt(Arquivos, "Score", GetPlayerScore(playerid));
DOF2_SetInt(Arquivos, "Dinheiro", GetPlayerMoney(playerid));
DOF2_SetInt(Arquivos, "Avisos", Avisos[playerid]);
DOF2_SetInt(Arquivos, "Administrador", rAdminNivel[playerid]);
DOF2_SaveFile();
}
return 1;
}
pawn Код:
if (dialogid == rAAdmin)
{
new Arquivos[50], Arquivos2[50];
if (response == 1)
{
if(!strlen(inputtext) || !isNumeric(inputtext))
{
format(String, sizeof(String), "{B9BCCC}Desejб setar qual level de administrador para {FFFF00}%s{B9BCCC}?", rNome(Player));
ShowPlayerDialog(playerid, rAAdmin, DIALOG_STYLE_INPUT, "[@rAdmin] - Administrador", String, "Setar", "Cancelar");
}else{
if(strval(inputtext) > 3 || strval(inputtext) > 3) return SendClientMessage(playerid, rVermelho, "[ERRO] Nivel de 0 а 3.");
format(StringTexto, sizeof(StringTexto), "[rAdmin] O admin {FFFF00}%s{A9A9A9} setou para {FFFF00}%s{A9A9A9} Administrador Level {FFFF00}%d{A9A9A9}.", rNome(playerid), rNome(Player), strval(inputtext));
DOF2_SetInt(Arquivos, "Administrador", DOF2_GetInt(Arquivos2, "Administrador"));
DOF2_SetInt(Arquivos, "Administrador", rAdminNivel[playerid]);
SendClientMessageToAll(rCinza, StringTexto);
DOF2_SaveFile();
rAdminNivel[Player] = strval(inputtext);
}
}
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
DOF2_SaveFile();