Name Problem! -
Akcent_Voltaj - 17.10.2013
i put this name "AdelinutzTaraf" and dosent work...i register enter game play succesfully, i relog(exit,enter server) then askes my password i type my password i get message Wrong password.Then message that this name is taken already..but! if i put my name Adelinutz without taraf it works perfectly....plz help..im trying to fix problem since 2012..but cant make it..is it bug??i dont know..
PS:edit plz help!!!plz try to fix my problem plz..if u dont understand say...
Re: Name Problem! -
Akcent_Voltaj - 17.10.2013
anyone plz?
Re: Name Problem! -
SilentSoul - 17.10.2013
Show us your register & login command or if you create dialog one show us your OnDialogResponse
Re: Name Problem! -
Akcent_Voltaj - 17.10.2013
its long dosent fit the chat..
Re: Name Problem! -
Akcent_Voltaj - 17.10.2013
PHP код:
if (gPlayerAccount[playerid] != 0)
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
TextDrawShowForPlayer(playerid, TextdrawConnect2);
TextDrawShowForPlayer(playerid, TextdrawConnect3);
format(loginstring,sizeof(loginstring),"{FFFFFF}Salut, {2F991A}%s {FFFFFF}Ai deja un cont pe Comunitatea Union-Zone!",loginname);
SendClientMessage(playerid, COLOR_WHITE, loginstring);
format(loginstring,sizeof(loginstring),"Acest cont este inregistrat.Te poti loga!",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
TextDrawShowForPlayer(playerid, TextdrawConnect2);
TextDrawShowForPlayer(playerid, TextdrawConnect3);
format(regstring,sizeof(regstring),"{FFFFFF}Salut, {FF0000}%s {FFFFFF}Tu nu ai un cont pe Comunitatea Union-Zone!",regname);
SendClientMessage(playerid, COLOR_WHITE, regstring);
format(regstring,sizeof(regstring),"Tu nu ai cont.Inregistreazate!",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Exit");
}
PROBLEM is this.but i dont know what.
PHP код:
else
{
gPlayerAccount[playerid] = 0;
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
TextDrawShowForPlayer(playerid, TextdrawConnect2);
TextDrawShowForPlayer(playerid, TextdrawConnect3);
format(regstring,sizeof(regstring),"{FFFFFF}Salut, {FF0000}%s {FFFFFF}Tu nu ai un cont pe Comunitatea Union-Zone!",regname);
SendClientMessage(playerid, COLOR_WHITE, regstring);
format(regstring,sizeof(regstring),"Tu nu ai cont.Inregistreazate!",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Exit");
}
Re: Name Problem! -
Akcent_Voltaj - 18.10.2013
ok no one knows??
Re: Name Problem! -
CrazyChoco - 18.10.2013
We need the login and register dialog response too. Anyway the way you scripted it looks different.
Re: Name Problem! -
Scrillex - 18.10.2013
Show the password saving and password loading.
Re: Name Problem! -
Akcent_Voltaj - 18.10.2013
HERE:
PHP код:
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));
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
format(loginstring,sizeof(loginstring),"Parola este gresita, Va rugam sa introduceti parola corecta!",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"{FFFF00}Login",loginstring,"Login","Exit");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 3) { SendClientMessage ( playerid , COLOR_RED , "Ai luat kick pentru ca ai bagat parola de 3 ori gresita !" ) ; Kick(playerid); }
}
}
if(dialogid == 12345)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Users/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_BLUE, "Username asta este luat deja.Alegeti alt nume!");
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),"Tu nu ai cont.Inregistreazate!",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Register",regstring,"Register","Exit");
}
}
}
else
{
Kick(playerid);
}
return 1;
}
Re: Name Problem! -
Akcent_Voltaj - 18.10.2013
here it is..
PS:again
I have a problem with my srv .... so I play on it goes all well and good, but if I relog and go again .. it asks me to register again and tells me that the name is already taken ... . hope you can help me!!