help meh,
#8

If you are using it at your Gamemode, it must return 1;
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid) // Lookup the dialogid
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1; // We processed it
            }
 
            switch(listitem) // This is far more efficient than using an if-elseif-else structure
            {
                case 0: // Listitems start with 0, not 1
                {
                    // What should happen when they click on the first item?
                }
                case 1:
                {
                    // And the second item?
                }
                case 2:
                {
                    // We can keep going on here ;)
                }
                // Add the rest of your listitems for dialog 1 here
 
            }
 
        }
        // Add the rest of your dialogs here
 
    }
    return 1;
}
If else in a Filterscript return 0;
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid) // Lookup the dialogid
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1; // We processed it
            }
 
            switch(listitem) // This is far more efficient than using an if-elseif-else structure
            {
                case 0: // Listitems start with 0, not 1
                {
                    // What should happen when they click on the first item?
                }
                case 1:
                {
                    // And the second item?
                }
                case 2:
                {
                    // We can keep going on here ;)
                }
                // Add the rest of your listitems for dialog 1 here
 
            }
 
        }
        // Add the rest of your dialogs here
 
    }
    return 0; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
}
Reply


Messages In This Thread
help meh, - by ttimpz0r - 09.11.2011, 17:05
Re: help meh, - by SmiT - 09.11.2011, 17:08
Re: help meh, - by ttimpz0r - 09.11.2011, 17:49
Re : help meh, - by Naruto_Emilio - 09.11.2011, 17:55
Re: help meh, - by ttimpz0r - 09.11.2011, 17:57
Re: help meh, - by Kostas' - 09.11.2011, 18:01
Re: help meh, - by ttimpz0r - 09.11.2011, 18:03
Re: help meh, - by Kostas' - 09.11.2011, 18:11
Re: help meh, - by -CaRRoT - 09.11.2011, 18:19
Re: help meh, - by ttimpz0r - 09.11.2011, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)