26.01.2013, 18:21
Hey Guys,
I convert my regular registation system to dialog registation system and there is a bug that I can't solve and I need your guys help.
So here it is,when I finish register the server it says:"That Username is already taken, please choose a different one."
That is the only line in my GM the sentence show in:
This code shows on this script:
What can I do .. ?
I convert my regular registation system to dialog registation system and there is a bug that I can't solve and I need your guys help.
So here it is,when I finish register the server it says:"That Username is already taken, please choose a different one."
That is the only line in my GM the sentence show in:
pawn Код:
if (fexist(string))
{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
Kick(playerid);
return 1;
}
pawn Код:
if(dialogid == 11)
{
if (response == 1)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "users/%s.ini", sendername);
//new File: hFile = fopen(string, io_read);
if (fexist(string))
{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
Kick(playerid);
return 1;
}
if(!strlen(inputtext))
{
new msg[256];
format(msg,256,"Welcome to Quyz Role Play Community\nPlease enter your password to create new account\n\nEnter the new password:");
ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Please Register!",msg,"Register","Quit");
return 1;
}
OnPlayerRegister(playerid,inputtext);
}
return 1;
}
else return Kick(playerid);
}