[AJUDA] num deu certo - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] num deu certo (
/showthread.php?tid=298954)
[AJUDA] num deu certo -
Master_Pawn - 23.11.2011
RESOLVIDO brigado Gustavo Por me ajudar Via MSN
Re: [AJUDA] num deu certo -
Lуs - 23.11.2011
Posta o
OnDialogResponse da login box.
Re: [AJUDA] num deu certo -
Master_Pawn - 23.11.2011
Код:
if(response)
{
if(dialogid == 12346 || dialogid == 12347)
{
if(strlen(inputtext))
{
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"SENHA INCORRETA\n\nFavor inserir a senha correta:\nSe errar novamente vocк serб banido",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Insanity UnderWord Revolution",loginstring,"Logar-se","Sair");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
}
}
Код:
if(dialogid == 12345)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Esta conta jб existe em nosso sistema de registros, por favor escolha outro.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Conta nгo registrada\nNome: %s\n\nPor favor insira sua senha:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Insanity UnderWord Revolution",regstring,"Registrar-se","Sair");
}
}
Re: [AJUDA] num deu certo -
Laercio - 23.11.2011
Poste o Sistema de Login Completo + DialogResponse Completa .