Every time i register it says "That name already exists"
#1

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!
Reply
#2

Please HELP somebody!
Reply
#3

pawn Code:
if(fexist(hFire)){
Reply
#4

this is dialog for?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)