aAdmin=0
DM=0
VIP=1
Matou=0
Morreu=0
convitent=0
Entrevista=0
MN=0
Skin=123
novato=2
Sexo=1
Tempo=0
EXP=1
Senha=4A3E42055358E9AD3AD3A98505ABFC41439689B317FE7DC4E67A239A2187E8741AE0E01231C60E6C240E4B95335582BD27D06B8D9DC2CADB8698172D78489B87
Skin=271
Profissao=68
ContaBancaria=1
SaldoBancario=28400
Dinheiro=89582849
Combustivel=200
Celular=0
CartaoTelefonico=0
MP3=0
LaserP=1
TCapacete=1
AntiHS=1
Sexo=1
HabTerrestre=1
HabAerea=1
HabNautica=1
Matou=4
Morreu=11
Preso=0
Bloco=0
Casa=1
Prop=0
Carta=0
Lembrete=Nada
Casado=0
CasouCom=Ninguem
Continuar=0
novato=2
Porte=1
Carteira=1
Level=1000
Faculdade=100
UsouConce=0
VIP=1
aAdmin=1
Admin=5
CasaX=1496.889038
CasaY=-688.781311
CasaZ=95.266960
convitent=0
Entrevista=0
MN=0
Tempo=2
EXP=6
DM=0
Procurado=0
rouboubanco=0
ofmaconha=0
ofcocaina=0
ofcrack=0
tmaconha=0
tcrack=0
tcocaina=0
Maconha=0
Crack=0
Cocaina=0
if(24 < strlen(inputtext) < 5) {
SendClientMessage(playerid, -1, "Numero de caracteres deve estar entre 5 e 24!");
ShowPlayerDialog(playerid, ....); //Dialog do login, faзa o mesmo para o de registro
return true;
}
if(dialogid == REGISTRO)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(response == 1)
{
if(strlen(inputtext) < MIN_SENHA || strlen(inputtext) > MAX_SENHA)
{
format(STRX, sizeof(STRX), "{FFFFFF}A senha deve ter entre {00FF00}%d {FFFFFF}e {00FF00}%d {FFFFFF}caracteres!", MIN_SENHA, MAX_SENHA);
SendClientMessage(playerid, -1, STRX);
format(STRX, sizeof(STRX), "{FFFFFF}Senha muito grande ou pequena.\n\n{00FF00}%s {FFFFFF}digite outra senha:", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrando Conta", STRX, "Registrar", "Sair");
return 1;
}
if(Confirma[playerid] == 0)
{
Confirma[playerid] = 1;
format(PlayerInfo[playerid][cSenha], MAX_SENHA, "%s", inputtext);
format(STRX, sizeof(STRX), "{00FF00}-| {FFFFFF}%s\n\n{00FF00}Agora confirme sua senha:", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Confirmando Senha", STRX, "Confirmar", "Sair");
}
else
{
if(strcmp(inputtext, PlayerInfo[playerid][cSenha], true) == 0)
{
Confirma[playerid] = 0;
WP_Hash(bufpass, sizeof(bufpass), inputtext);
CreateFileAccount(file, bufpass);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
ShowPlayerDialog(playerid, cidades, DIALOG_STYLE_LIST, "Cidades", "{FF0000}Los Santos\n{33FF00}San Fierro\n{00FFDD}Las Venturas\n{0000FF}Fort Carson", "Morar", "Cancelar");
}
else
{
Confirma[playerid] = 0;
format(STRX, sizeof(STRX), "{00FF00}-| {FFFFFF}%s\n\n{00FF00}A senha digitada nгo corresponde, tente novamente.\n{FF33FF}Digite sua senha:", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registrando uma Conta", STRX, "Registrar", "Sair");
}
}
}
else
{
format(STRX, sizeof(STRX), "O(A) jogador(a) %s foi kickado(a) por [HD]Sling[SWAT]. Motivo: Nгo se Registrou/Logou", GetPlayerNameEx(playerid));
SendClientMessageToAll(Amarelo, STRX);
KickLog(STRX);
Kick(playerid);
}
}
if(dialogid == LOGIN)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(response == 1)
{
WP_Hash(bufpass, sizeof(bufpass), inputtext);
if(strcmp(bufpass, dini_Get(file, "Senha"), true) == 0)
{
PlayerInfo[playerid][Logged] = 1;
StopAudioStreamForPlayer(playerid);
if(dini_Int(file, "Continuar") == 1)
{
SendClientMessage(playerid, -1, "Vocк pode ir a sua posiзгo salva, use /continuar");
}
if(dini_Int(file, "novato") == 2)
{
format(string, sizeof(string), "Seu Nick: %s » Seu ID: %d » Seu IP: %s", GetPlayerNameEx(playerid), playerid, GetPlayerIPEx(playerid));
SendClientMessage(playerid, 0xFFFF00AA, string);
SendClientMessage(playerid, -1, "Veja sua identidade, digite /rg");
}
if(trocandonick[playerid] == 1)
{
ShowPlayerDialog(playerid, mudarnick, DIALOG_STYLE_INPUT, "Trocando Nick", "{FFFFFF}Vocк estб sendo forзado(a) a trocar de nick!\n{00FF00}Agora sгo permitidos apenas nicks no formato \"Nome_Sobrenome\".\n{33AA33}Digite seu novo nick:", "Mudar", "Sair");
}
else
{
SetSpawnInfo(playerid, 1, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"), 357.9491, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
ProfLabel[playerid] = CreateDynamic3DTextLabel(" ", -1, 0.0, 0.0, 0.4, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 200.0);
PlayerTextDrawShow(playerid, PlayerInfo[playerid][AreaName]);
#if defined gText1User
PlayerTextDrawShow(playerid, PlayerInfo[playerid][gText1]);
#endif
#if defined gText2User
PlayerTextDrawShow(playerid, PlayerInfo[playerid][gText2]);
#endif
TextDrawShowForPlayer(playerid, Relogio);
GangZoneShowForPlayer(playerid, GangZonesFix[1], Vermelho);
GangZoneShowForPlayer(playerid, GangZonesFix[2], Vermelho);
GangZoneShowForPlayer(playerid, GangZonesFix[3], Vermelho);
GangZoneShowForPlayer(playerid, GangZonesFix[4], Vermelho);
GangZoneShowForPlayer(playerid, GangZonesFix[5], Vermelho);
GangZoneShowForPlayer(playerid, GangZonesFix[6], Verde);
GangZoneShowForPlayer(playerid, GangZonesFix[7], Branco);
GangZoneShowForPlayer(playerid, GangZonesFix[8], Branco);
GangZoneShowForPlayer(playerid, GangZonesFix[9], Branco);
LoadPlayerRemovedBuildings(playerid, "Buildings/Dten.txt");
PlayerPlaySound(playerid, 1057, 0, 0, 0);
}
else
{
PlayerInfo[playerid][LoginsFalsos]++;
if(PlayerInfo[playerid][LoginsFalsos] >= 10)
{
format(STRX, sizeof(STRX), "O(A) jogador(a) %s foi kickado(a) por [HD]Sling[SWAT]. Motivo: %d Tentativas de Login", GetPlayerNameEx(playerid), 10);
SendClientMessageToAll(Amarelo, STRX);
KickLog(STRX);
Kick(playerid);
}
else
{
SendClientMessage(playerid, Vermelho, "Senha incorreta!");
format(STRX, sizeof(STRX), "{00FF00}Senha incorreta, {FFFFFF}%s!\n\n{00FF00}Digite sua senha novamente:", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "CONTA", STRX, "Logar", "Sair");
}
}
}
else
{
format(STRX, sizeof(STRX), "O(A) jogador(a) %s foi kickado(a) por [HD]Sling[SWAT]. Motivo: Nгo se Registrou/Logou", GetPlayerNameEx(playerid));
SendClientMessageToAll(Amarelo, STRX);
KickLog(STRX);
Kick(playerid);
}
}
estou tendo o mesmo problema que o seu quando aparece o login vc aperta enter ele loga sem pedir a senha :/
|
Foda isso eu testei isso no Gm do Nominal BetaRp nao esta com esse bug ja tentei achar oq ele fes mais nao consigo tenta vc ae depos!
|
if(strlen (inputtext) < 4 || strlen (inputtext) > 15)
return ShowPlayerDialog( playerid, xRegistro, DIALOG_STYLE_INPUT,"Registro","A senha deve ser entre 4 e 15 caractйrias.","Registro","Sair");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch ( dialogid )
{
case xRegistro:
{
if(strlen (inputtext) < 4 || strlen (inputtext) > 15)
return ShowPlayerDialog( playerid, xRegistro, DIALOG_STYLE_INPUT,"Registro","Coloca a senha seu CORNO","Registro","Sair");
new Str[202], Nome[21], Float:X, Float:Y, Float:Z;
GetPlayerName(playerid, Nome, 20);
GetPlayerPos(playerid, X, Y, Z);
format(Str, 202, "INSERT INTO `users`( `name`, `password`, `level`, `cash`, `skin`, `money`, `X`, `Y`, `Z`) VALUES ('%s', '%i', '%i', '%i', '%i', '%i', '%f', '%f', '%f') ", Nome, Hash(inputtext), 0, 500, 240, 500, X, Y, Z);
mysql_function_query(Connect, Str, false, #, #);
SendClientMessage(playerid, -1, "Registrado com sucesso.");
ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_LIST, "{00ff00}» {ffffff}Escolha seu Sexo", "{ff0000}» {ffffff}Masculino \n{FF00F7}» {ffffff}Feminino", "Ok", "Ok");
}
if(dialogid == AVISO)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(response == 1)
{
if(PlayerInfo[playerid][Logged] == 0)
{
if(dini_Exists(file))
{
format(STRX, sizeof(STRX), "{32CD32}•є•| {FFFF00}%s{32CD32} |•є•\n\n{0000FF}Logue-se,{FF0000} digite sua senha:", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "CONTA", STRX, "Logar", "Sair");
}
else
{
if(strlen (inputtext) < 4 || strlen (inputtext) > 15)
return ShowPlayerDialog( playerid, REGISTRO, DIALOG_STYLE_INPUT,"Registro","Coloca a senha seu CORNO","Registro","Sair");
}
}
}
else
{
format(STRX, sizeof(STRX), "O(A) jogador(a) %s foi kickado(a) por [HD]Sling[SWAT]. Motivo: Nгo se Registrou/Logou", GetPlayerNameEx(playerid));
SendClientMessageToAll(Amarelo, STRX);
KickLog(STRX);
Kick(playerid);
}
}