Problem OnDialogResponse
#1

Hello, I made 2 dialogues at mustlogin and mustregister like on luxadmin but I don't have public OnDialogResponse in the admin system. And I don't know how to make it because I'm not that skilled. I use ladmin4v2.

Code:
	if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0)
	{
        #if USE_DIALOGS == true
		new lstring[256];
		format(lstring,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
		ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"Login Account",lstring,"Login","Quit");
		#endif
		return 1;
	}

	if(ServerInfo[MustRegister] == 1 && PlayerInfo[playerid][Registered] == 0)
	{
        #if USE_DIALOGS == true
		new rstring[256];
		format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
		ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
		#endif
		return 1;
	}
Please help me make public OnDialogResponse. Thank you.
Reply
#2

Try yourself
https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOGID+67:
        {
            //LOGIN CODE
        }
        case DIALOGID+66:
        {
            //REGISTER CODE
        }
    }
    return 1;
}
Reply
#4

Thanks a lot for your help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)