Dialog is not showing up.
#1

Code from ondialogresponse:

PHP код:
           if(dialogid == 4)
        {
            if(
response)
            {
                new 
rstring[1912];
                
format(rstringsizeof(rstring), "%s\n\n\t\t\t\tBy clicking the \"I Agree\" button you agree with our rules and regulations.",ServerRules());
                
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules Agreement (1/7)",rstring,"I Agree","I Disagree");
            }
            else
            {
                
SetTimerEx("DelayedKick"100false"i"playerid);
            }
            return 
1;
        }
         if(
dialogid == 5)
        {
            if(
response)
            {
                new 
FirstSet random(4);
                if(
FirstSet == 0)ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"1/5 A roleplaying game's main aim is to... (2/7)","...Earn money and level-up.\n...Assume the role of the character you're playing with.\n...Kill each others.","Select","Quit");
                else if(
FirstSet == 1)ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"1/5 What does IC stand for? (2/7)","Inner Characteristics.\nInside Class.\nIn Character.","Select","Quit");
                else if(
FirstSet == 2)ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"1/5 IC refers to the world of the... (2/7)","...Players, rather than the world of the characters.\n...Characters, rather than the world of the players.\n...Players and the world of the characters.","Select","Quit");
                else if(
FirstSet == 3)ShowPlayerDialog(playerid,9,DIALOG_STYLE_LIST,"1/5 What does OOC stand for? (2/7)","Out Of Character.\nOut Of Class\nOut Of Car.","Select","Quit");
            }
            else
            {
                
SetTimerEx("DelayedKick"100false"i"playerid);
            }
        } 
Code from OnPlayerConnect.
PHP код:
          format(stringsizeof(string),"Welcome to International Roleplay %s!\n\nThe registration process will be as following:\n\nStep 1: Agreement on server rules.\nStep 2: A roleplay test that consists of 5 random questions.\nStep 3: Password selection.\nStep 4: E-mail selection.\nStep 5: Gender selection.\nStep 6: Age selection.\nStep 7: Skin selection.\n\nThanks for playing!\n\nInternational Roleplay Team"GetName(playerid));
        
ShowPlayerDialog(playerid4,DIALOG_STYLE_MSGBOX,"International Roleplay",string,"Continue","Quit"); 

When I'd login into my server it does show the dialog.
But if I click "Continue", nothing happens.
If I click "Exit" it does kick me < this is supposed to be.
Reply
#2

Try this..

And, why you use that sooo big string and timer for kick?

PHP код:
if(dialogid == 4)
{
    if(!
response) return SetTimerEx("DelayedKick"100false"i"playerid);
    if(
response)
    {
        new 
rstring[1912];
        
format(rstringsizeof(rstring), "%s\n\n\t\t\t\tBy clicking the \"I Agree\" button you agree with our rules and regulations.",ServerRules());
        
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules Agreement (1/7)",rstring,"I Agree","I Disagree");
        return 
1;
    }

Reply
#3

Quote:
Originally Posted by xClown
Посмотреть сообщение
Try this..

And, why you use that sooo big string and timer for kick?

PHP код:
if(dialogid == 4)
{
    if(!
response) return SetTimerEx("DelayedKick"100false"i"playerid);
    if(
response)
    {
        new 
rstring[1912];
        
format(rstringsizeof(rstring), "%s\n\n\t\t\t\tBy clicking the \"I Agree\" button you agree with our rules and regulations.",ServerRules());
        
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules Agreement (1/7)",rstring,"I Agree","I Disagree");
        return 
1;
    }

Well that timer is useless indeed, as I'm not showing a message or something like that.
That big string is because I'm also adding a server rules stock to that dialog.
Wich is about 1900 characters.
Reply
#4

welll
Reply
#5

bump
Reply
#6

Check maybe you are using any other dialog on 4 number
Reply
#7

You probably have another dialog with the same ID in another script that is causing conflict.

It's also important to 'return 0;' at the end of OnDialogResponse (just like OnPlayerCommandText) if no dialogid was matched, returning 1 will prevent the server from processing any more dialogs.

See comments on the return statements on the following page : https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#8

Quote:
Originally Posted by iggy1
Посмотреть сообщение
You probably have another dialog with the same ID in another script that is causing conflict.

It's also important to 'return 0;' at the end of OnDialogResponse (just like OnPlayerCommandText) if no dialogid was matched, returning 1 will prevent the server from processing any more dialogs.

See comments on the return statements on the following page : https://sampwiki.blast.hk/wiki/OnDialogResponse
I'm pretty sure no other dialog has the same ID.
I don't have another scripts but the gamemode itselves.
I don't use filterscripts.

I'm scripting this gamemode from stratch and I'm pretty sure I've never used ID 4 before.
Reply
#9

The one that's bugged is this ? :
PHP код:
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules Agreement (1/7)",rstring,"I Agree","I Disagree"); 
Reply
#10

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
The one that's bugged is this ? :
PHP код:
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Server Rules Agreement (1/7)",rstring,"I Agree","I Disagree"); 
OnPlayerConnect I'd request the script to call up dialog ID 4.
Dialog ID 4 pops up.
If you click quit: It does kick the player.
If you click continue: It doesn't show up dialog ID 5. + the current dialog just disappears.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)