Dialogs wont work together
#1

Hello!
As i said in title my dialogs wont work.It happens like:I have 1 dialogs in server,all works and i ok,when i install new dialog 2nd and start server they both wont work and they all simple commands wont work too.How can i fix it.I am not good scripter(professional)i am noob
Only what i made by my self is weapon system.You can check it out!
Reply
#2

Can you show us your script? Between, maybe you are using the same dialog ID in more than in one of them.
Reply
#3

The dialog ID's are conflicting is my first thought. One ID per dialog. As you said it worked until you added a new one. This is what i mean.

pawn Код:
#define DIALOG_WEAPONS 1
#define DIALOG_CARS 2

//where you need it

ShowPlayerDialog(playerid,DIALOG_WEAPONS,DIALOG_STYLE_LIST,"Title","Lists","Button one","Button 2");
Reply
#4

When i try to change id.Like from
pawn Код:
#define DIALOGID 3300
to something like this
pawn Код:
#define DIALOG_Teleport 1
it drops me many errors.
I dont have these dialogs in one script.Every dialog have their filterscript
Reply
#5

Every my dialog is not in one script,they all have their script file.
Reply
#6

pawn Код:
#define DIALOG_WEAPONS 3
 
// In some command
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Desert Eagle\nAK-47\nCombat Shotgun", "Select", "Close");
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
            }
            if(listitem == 1) // They selected the second item - AK-47
            {
                GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
            }
            if(listitem == 2) // They selected the third item - Desert Eagle
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
 
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)