Dialog blocked?
#1

Hey guys, I'm making a MDC system.
But something in this code blocks to open the dialog 22

pawn Код:
switch(dialogid) // Lookup the dialogid
    {
        case 20:
        {
            if(!response)
            {

                return 1;
            }

            switch(listitem)
            {
               
                case 0:
                {
                ShowPlayerDialog(playerid,21,DIALOG_STYLE_INPUT,"Civ.Information","Fill in a playerid","Ok","Cancel");
                }
                case 1:
                {
                new string[256];
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                if(IsPlayerConnected(i))
                {
                if(PlayerInfo[i][wantedlevel] == 1)
                {
                new name[128];
                GetPlayerName(i,name,128);
                format(string, 256, "%s", name);
                ShowPlayerDialog(playerid,22,DIALOG_STYLE_MSGBOX,"Suspects",string,"Ok","Cancel");
                }
            }
        }
        }
    }
}
}
So what blocks to show dialog 22 in case:1 ?
Reply
#2

It's sounds stupid, but do you know for sure that the dialog id 22 isn't used already?

Some tips:
The maxium lenght of a playername in SA:MP is 24, so its better to shorten 'string' to 24 characters instead of 256. On this way, you're saving some cells.

Replace 'name[128]' with name[MAX_PLAYER_NAME], it will save cells too, and decrease lagg.

EDIT: Try to put print() messages in your code to see where it goes wrong.

Veel succes uchiha
Reply
#3

Quote:
Originally Posted by -Danny-
Посмотреть сообщение
It's sounds stupid, but do you know for sure that the dialog id 22 isn't used already?

Some tips:
The maxium lenght of a playername in SA:MP is 24, so its better to shorten 'string' to 24 characters instead of 256. On this way, you're saving some cells.

Replace 'name[128]' with name[MAX_PLAYER_NAME], it will save cells too, and decrease lagg.

EDIT: Try to put print() messages in your code to see where it goes wrong.

Veel succes uchiha
I'm sure that it's not used :P I also tried other ID's

And about the cells.
I know ;P Thanks anyways>>


Lol danny xD
Reply
#4

I will give a stupid answer but i hope you don't be mad... If you change return 1; to return 0; dont change nothing? I dotn udnerstund mutch about dialogs.... sorry!
Reply
#5

Nop :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)