17.10.2016, 19:20
Good afternoon.
I'm working on a multi-character system for a new gamemode I am working on.
Once people connect to the server, they get asked to fill in a name for their master account.
Then, if they did that the name will be store in a string & then they must fill in a password.
Then, if they have filled in their password I do create a ini file using this code:
Tempname is stored right after OnDialogResponse:
Now, the problem is.. if I register IG, this is the ini file that gets created:

So the name doesn't get filled in..
Can somebody help me out? I don't know what I did whrong.
I'm working on a multi-character system for a new gamemode I am working on.
Once people connect to the server, they get asked to fill in a name for their master account.
Код:
else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"World of Darkness Roleplay","Please type in your master account name:\n{AA3333AA}WARNING: You must use this name the next time you connect to our server.","Continue","Quit"); }
Код:
case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "World of Darkness Roleplay","Please type in your master account name:\n{AA3333AA}WARNING: You must use this name the next time you connect to our server.\nError: You have entered an invalid name, try again.","Continue","Quit"); format(Tempname, sizeof(Tempname), "%s", inputtext); new string[128]; format(string, sizeof(string), "Your master account name is {3BB9FF}%s{FFFFFF}\nFill in a password to continue.", inputtext); ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_INPUT, "World of Darkness Roleplay",string,"Register","Quit"); return 1; } }
Код:
format(string,sizeof(string),PATH,Tempname); new INI:File = INI_Open(string); INI_SetTag(File,"data"); INI_WriteInt(File,"Password2",udb_hash(inputtext)); INI_WriteString(File, "Name1", ""); INI_WriteString(File, "Name2", ""); INI_WriteString(File, "Name3", ""); INI_Close(File);
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new Tempname[34];

So the name doesn't get filled in..
Can somebody help me out? I don't know what I did whrong.