Does it works? [Dialogs]
#10

Quote:
Originally Posted by Glad2BeHere
View Post
u need to define all dialogs

pawn Code:
//        name dialog id  
#define buy0 102
#define buy1 103
#define sel2 104
#define sel3 105
can u show the entire dialog re cause i see more errors than what u show
Sure:

Defines:

Code:
 #define DIALOG_WEAPONS
#if defined FILTERSCRIPT
#define DIALOG SEL0
#define DIALOG_SEL1
#define DIALOG_SEL2
#define DIALOG_SEL3
#define DIALOG_SEL4
OnFilterScriptInt
pawn Code:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Shop" " & handguns\es\nGrades & amor etc\nChange skin\nAccessories\t" "Buy" "Cancel");
OnDialogResponse

pawn Code:
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
            {
                ShowPlayerDialog(playerid, DIALOG_BUY0, DIALOG_STYLE_LIST, "Shotguns & handguns", "9mm 150$\nSilenced 9mm 250$\nDesert Eagle\nShotgun\nSawnoff Shotgun 600$\nCombat Shotgun 200$\nMicro SMG/Uzi 350$\nMP5 250$\t", "Buy", "Close");
            }
            if(listitem == 1) //1
            {
                ShowPlayerDialog(playerid, DIALOG_BUY1, DIALOG_STYLE_LIST, "Rifles", "Country Rifle 200$\nSniper Rifle 400$\t", "Buy" "Close");
            }
            if(listitem == 2) //2
            {
                ShowPlayerDialog(playerid, DIALOG_SEL2, DIALOG_STYLE_LIST, "Grenades & armor etc", "Grenades 250$\nMolotov Cocktail 350$\nArmor 150$", "Buy" "Close");
            }
              if(listitem == 3) //3
            {
                 ShowPlayerDialog(playerid, DIALOG_SEL3, DIALOG_STYLE_LIST, "Change skin", "Hobo skin 3000$\nVarios Los Aztecas 2 3000\nCluckin' Bell Worker 2000$\t", "Buy" "Close");
            }
              if(listitem == 4) //4
            {
                ShowPlayerDialog(playerid, DIALOG_SEL4, DIALOG_STYLE_LIST, "Accessories", "Hat", "Buy" "Close");
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
        }
        return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}

Errors:


Code:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(49) : error 029: invalid expression, assumed zero
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(56) : error 017: undefined symbol "DIALOG_BUY0"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(60) : error 017: undefined symbol "DIALOG_BUY1"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(64) : error 017: undefined symbol "DIALOG_SEL2"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(66) : warning 217: loose indentation
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(68) : error 017: undefined symbol "DIALOG_SEL3"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(72) : error 017: undefined symbol "DIALOG_SEL4"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(77) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Messages In This Thread
Does it works? [Dialogs] - by davve95 - 27.10.2012, 16:38
Re: Does it works? [Dialogs] - by Mafioso97 - 27.10.2012, 16:41
Re: Does it works? [Dialogs] - by davve95 - 27.10.2012, 16:42
Re: Does it works? [Dialogs] - by Mafioso97 - 27.10.2012, 16:44
Re: Does it works? [Dialogs] - by davve95 - 27.10.2012, 16:54
Re: Does it works? [Dialogs] - by B-Matt - 28.10.2012, 07:56
Re: Does it works? [Dialogs] - by davve95 - 28.10.2012, 11:51
Re: Does it works? [Dialogs] - by davve95 - 05.11.2012, 16:22
Re: Does it works? [Dialogs] - by Glad2BeHere - 05.11.2012, 16:42
Re: Does it works? [Dialogs] - by davve95 - 05.11.2012, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)