Boa madrugada a todos, rapaziada o que acontece й o seguinte.
Tenho uma variбvel que obtem o IDIOMA do player.
Porйm tudo ocorre normal mas quando entra no cуdigo abaixo o valor da variбvel muda sozinha conforme debug no painel e nгo exibe as outras respectivas dialogs pois o valor mudou sozinho ! O que pode ser ? #QUEMACUMBAЙESSA?
PHP Code:
case DIALOG_EMAIL: {
if(response) { /*-- BOTГO REGISTRAR EMAIL --*/
new string[500], query[500];
if(!strlen(inputtext)) {
SendClientMessage(playerid, -1, (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("[ ERROR ] {FF0000}You did not enter a valid email in case you need to recover your account !") : ("[ ERRO ] {FF0000}Vocк nгo digitou um e-mail vбlido para caso precise recuperar sua conta !")));
if(pInfo[playerid][pIdioma] == IDIOMA_INGLES) {
format(string, sizeof(string), "{FFFFFF}Welcome to: {ffbc59}War of Myths - MultiMode © | BILНNGUE | Come!\n\n{ffbc59}* {FFFFFF}Please enter a valid email address in case you need to recover your account in the future! {ffbc59}*");
} else {
format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Guerra dos Mitos - MultiModo © | BILНNGUE | Venha!\n\n{ffbc59}* {FFFFFF}Insira um e-mail vбlido caso precise futuramente recuperar sua conta! {ffbc59}*");
}
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("{ffbc59}War of Myths - {FFFFFF}MultiMode") : ("{ffbc59}Guerra dos Mitos - {FFFFFF}MultiModo")), string, (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("Register") : ("Registrar")), (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("Exit") : ("Sair")));
}
printf("1 Valor da variavel e %d", pInfo[playerid][pIdioma]);
format(query, sizeof(query), "UPDATE `contas` SET `email` ='%s' WHERE `nome`='%s'", DB_Escape(inputtext), DB_Escape(GetPlayerNome(playerid)));
db_query(database, query);
format(pInfo[playerid][Email], 60, "%s", inputtext);
if(pInfo[playerid][pIdioma] == IDIOMA_INGLES) {
format(string, sizeof(string), "{FFFFFF}•{ffbc59}» {FFFFFF}Hello {ffbc59}%s {FFFFFF}your account has been registered, but do not forget that your password is {ffbc59}%s", GetPlayerNome(playerid), pInfo[playerid][Senha]);
SendClientMessage(playerid, -1, string);
} else if(pInfo[playerid][pIdioma] == IDIOMA_PORTUGUES) {
format(string, sizeof(string), "{FFFFFF}•{ffbc59}» {FFFFFF}Olб {ffbc59}%s {FFFFFF}sua conta foi registrada, porйm nгo se esqueзa que a sua senha й {ffbc59}%s", GetPlayerNome(playerid), pInfo[playerid][Senha]);
SendClientMessage(playerid, -1, string);
}
format(string, sizeof(string), (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("{FFFFFF}•{ffbc59}» The email you registered with the account is {ffbc59}%s") : ("{FFFFFF}•{ffbc59}» {FFFFFF}O e-mail cadastrado na conta й {ffbc59}%s")), inputtext);
SendClientMessage(playerid, -1, string);
new value[5];
for(new i = 0; i < 4; i++) { value[i] = random(9); }
printf("%d%d%d%d", value[0], value[1], value[2], value[3]);
format(pInfo[playerid][pCodigoAtivarConta], 50, "%d%d%d%d", value[0], value[1], value[2], value[3]);
format(string, sizeof(string), (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("Hello %s your account activation code: %s") : ("Ola %s seu codigo de ativacao de conta: %s")), GetPlayerNome(playerid), pInfo[playerid][pCodigoAtivarConta]);
SendMail(inputtext, EMAIL_SERVIDOR, (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("War of Myths - MultiMode") : ("Guerra dos Mitos - MultiModo")), (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("Account Activation") : ("Ativacao de Conta")), string);
SendClientMessage(playerid, -1, (pInfo[playerid][pIdioma] == IDIOMA_INGLES ? ("[•»] {ffbc59}Your activation information for your account has been sent to your email!") : ("[•»] {ffbc59}Foram enviados para o email as informaзхes para ativaзгo da sua conta !")));
printf("2 Valor da variavel e %d", pInfo[playerid][pIdioma]);
if(pInfo[playerid][pIdioma] == IDIOMA_INGLES) {
ShowPlayerDialog(playerid, DIALOG_ATIVAR_CONTA, DIALOG_STYLE_INPUT, "{ffbc59}War of Myths - {FFFFFF}MultiMode", "{FFFFFF}Welcome to: {ffbc59}War of Myths - MultiMode © | BILНNGUE | Come!\n\n{ffbc59}* {FFFFFF}Enter the code sent to your email to activate your account! {ffbc59}*", "Confirm", "Cancel");
} else if(pInfo[playerid][pIdioma] == IDIOMA_PORTUGUES) {
ShowPlayerDialog(playerid, DIALOG_ATIVAR_CONTA, DIALOG_STYLE_INPUT, "{ffbc59}Guerra dos Mitos - {FFFFFF}MultiModo", "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Guerra dos Mitos - MultiModo © | BILНNGUE | Venha!\n\n{ffbc59}* {FFFFFF}Insira o cуdigo enviado para o seu email para ativar sua conta! {ffbc59}*", "Confirmar", "Cancelar");
}
} else { /*-- BOTГO SAIR --*/
new query[128];
format(query, sizeof(query), "DELETE FROM `contas` WHERE `nome` = '%q'", DB_Escape(GetPlayerNome(playerid)));
db_query(database, query);
Kick(playerid);
}
return 1;
}
Code:
[04:38:19] Number of vehicle models: 0
[04:38:41] [connection] 127.0.0.1:59220 requests connection cookie.
[04:38:42] [connection] incoming connection: 127.0.0.1:59220 id: 0
[04:38:42] [join] Leonardo_Bradoks has joined the server (0:127.0.0.1)
[04:38:44] [db_log_queries]: SELECT * FROM `contas` WHERE `nome` = 'Leonardo_Bradoks'
[04:38:45] [db_log_queries]: SELECT * FROM `contas` WHERE `nome` = 'Leonardo_Bradoks'
[04:38:49] [db_log_queries]: INSERT INTO contas (nome, email, senha, admin, skin, px, py, pz, pa) VALUES ('Leonardo_Bradoks', 'example@example.com', 'leo2017', '0', '0', '0.0', '0.0', '0.0', '0.0')
[04:38:57] 1 Valor da variavel e 101
[04:38:57] [db_log_queries]: UPDATE `contas` SET `email` ='leobradoks@outlook.com' WHERE `nome`='Leonardo_Bradoks'
[04:38:57] 0511
[04:38:57] 2 Valor da variavel e 55
[04:38:58] Mailer script says:
O motivo de ter dado esse bug foi devido tantas operaзхes ternбrias seguidas !