Every time i register it says "That name already exists" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Every time i register it says "That name already exists" (
/showthread.php?tid=401408)
Every time i register it says "That name already exists" -
xXx:FireBlade - 22.12.2012
Hi,
I made my own Reg/Log system and it's good but i have a problem...
Every time i register and quit the game and then enter the server again i hope to get the Login Dialog but all i get is a message like this:
Code:
That name already exists, please choose another one!
Code:
if(dialogid == 12345)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Accounts/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "That name already exists, please choose another one!");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[512];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}Welcome on {00C0FF}blabla RolePlay!\n\n{00C0FF}||------------------------------------------------------------||\n\n{00C0FF}-Your name: {FFFFFF}%s\n\n{00C0FF}-Forum: {FFFFFF}www.blabla.ha\n\n{00C0FF}-Account: {FFFFFF}You don't have an a account\n\n{00C0FF}Enter{FFFFFF}password!\n\n{00C0FF}||------------------------------------------------------------||",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{00C0FF}Register",regstring,"Register","Exit");
}
}
}
So i have to make another account and again when i Exit and log in it says that already exists :S how can he not recognize me so that the system knows that i'm for example Luis_Suarez!
Please help!
Re: Every time i register it says "That name already exists" -
xXx:FireBlade - 23.12.2012
Please HELP somebody!
Re: Every time i register it says "That name already exists" -
park4bmx - 23.12.2012
Re: Every time i register it says "That name already exists" -
[TMS]Legena - 22.01.2014
this is dialog for?