PDA

View Full Version : login/register dialogs don't show


Extraordinariness
03/04/2014, 06:53 AM
[SOLVED]
Thanks for everyone! :D

LocMax
03/04/2014, 07:18 AM
Do you get any errors while compiling?
They simply do not show at all?

Extraordinariness
03/04/2014, 07:41 AM
I do not get any error at compiling. They do not show at all.

AndySedeyn
03/04/2014, 07:43 AM
OnDialogResponse should return 0;



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 0;
}

Extraordinariness
03/04/2014, 09:30 AM
Still didn't work.

AndySedeyn
03/04/2014, 09:41 AM
Still didn't work.


Do you have other scripts that have a dialog system?
If so, check if the dialog ID's differ from each other.


#define DIALOG_REGISTER 101
#define DIALOG_LOGIN 102
#define DIALOG_SUCCESS_1 103
#define DIALOG_SUCCESS_2 104
#define DIALOG_STATS 100


This is what you should check.
You can change the ID's of these DIALOG's to a number that you know is not in use.

Extraordinariness
03/04/2014, 09:52 AM
It's now 3000 to 3003. Nothing worked.

Arjanz
03/04/2014, 04:34 PM
Something is missing i suppose , coz code is fine.

Extraordinariness
04/04/2014, 12:08 AM
What do you think I'm missing? D:

*hey arjan! :P*

++++++++++++++++++++++++++++++++
EDIT: My other dialogs are working. This is the only dialog that doesn't show.
++++++++++++++++++++++++++++++++

Extraordinariness
04/04/2014, 03:31 AM
bump. I iz wait for anzwer

SickAttack
04/04/2014, 03:39 AM
public OnPlayerConnect(playerid)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(fexist(UserPath(playerid)))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
return 1;
}

// Put the code below on the bottom of your script:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_String("Password",PlayerInfo[playerid][pPass], 129);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
INI_Int("Headshots",PlayerInfo[playerid][pHeadshots]);
INI_Int("Bank",PlayerInfo[playerid][pBankmoney]);
return 1;
}

stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return string;
}

Extraordinariness
04/04/2014, 04:21 AM
What the hell is wrong with my script? It still doesnt work, sir :(

I ain't trolling.

SickAttack
04/04/2014, 04:55 AM
Don't make it a filterscript, and put it in your gamemode.

Extraordinariness
04/04/2014, 05:25 AM
Now, I've made it on my GM. The problem is, it doesn't load .ini, but it saves .ini.

Extraordinariness
04/04/2014, 06:54 AM
SOLVED. THANKS EVERYBODY! :D