pawn Код:
if(dialogid == ReGiStEr)
{
new file[128];
new string[128];
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(!response) return Kick(playerid);
if(response) {
if(strlen(inputtext) == 0) {
format(string,128, "Bem vindo(a) ao server.\n\nUsuбrio: %s \n\nInforme sua senha para Registrar:", name);
ShowPlayerDialog(playerid, ReGiStEr, DIALOG_STYLE_INPUT, "Conta", string, "Registrar", "Sair");
return 0;
}
format(file,128,"RoxBrasil/contas/%s.ini",name);
if(!fexist(file)) {
dini_Create(file);
dini_IntSet(file,"Senha", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel", 0);
dini_IntSet(file,"Score", GetPlayerScore(playerid));
dini_IntSet(file,"Money", GetPlayerMoney(playerid));
dini_IntSet(file,"Deaths", PlayerInfo[playerid][Deaths]);
dini_IntSet(file,"Kills", PlayerInfo[playerid][Kills]);
dini_IntSet(file,"ServerTime", PlayerInfo[playerid][ServerTime]);
dini_IntSet(file,"WantedLevel", GetPlayerWantedLevel(playerid));
dini_IntSet(file,"PlayerSkin",GetPlayerSkin(player id));
dini_IntSet(file,"Balance",pBankInfo[playerid][PLAYER_BALANCE]);
dini_IntSet(file, "PositionX", floatround(positionx));
dini_IntSet(file, "PositionY", floatround(positiony));
dini_IntSet(file, "PositionZ", floatround(positionz));
SetTimerEx("ZerowanieKasy2", 20000, 0, "d", playerid);
format(string,128, "Bem vindo(a) ao server\n\nUsuбrio: %s \n\nInforme sua senha para logar:", name);
ShowPlayerDialog(playerid, LoGiN, DIALOG_STYLE_INPUT, "Conta", string, "Logar", "Sair");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name,24);
printf("%s Registrou sua conta!", name);
SendClientMessage(playerid, BRANCO, "[CONTA]: Conta Registrada com sucesso.");
return 1;
}
}
return 1;
}