Dialogs wont work together - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialogs wont work together (
/showthread.php?tid=446818)
Dialogs wont work together -
Kittylol - 27.06.2013
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!
Respuesta: Dialogs wont work together -
[DOG]irinel1996 - 27.06.2013
Can you show us your script? Between, maybe you are using the same dialog ID in more than in one of them.
Re: Dialogs wont work together -
DobbysGamertag - 27.06.2013
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");
Re: Dialogs wont work together -
Kittylol - 27.06.2013
When i try to change id.Like from
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
Re: Respuesta: Dialogs wont work together -
Kittylol - 27.06.2013
Every my dialog is not in one script,they all have their script file.
Re: Dialogs wont work together -
Anak - 27.06.2013
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.
}