pawn Код:
if(dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if(!strlen(inputtext))return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrado","Agora logue-se:","Login","Cancel");
new tmp;
tmp = dini_Int(file,"Password");
if(udb_hash(inputtext) != tmp)
{
SendClientMessage(playerid,COR_AZUL,"Senha incorreta");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrado","Agora logue-se","Login","Cancel");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid] [pAdminLevel] = dini_Int(file,"AdminLevel");
SetPlayerScore(playerid,PlayerInfo[playerid] [pScore]);
GivePlayerMoney(playerid,dini_Int(file,"Cash")-GetPlayerMoney(playerid));
SpawnPlayer(playerid);
SendClientMessage(playerid,COR_AZUL,"Logado");
}