SA-MP Forums Archive
Dialog fix - 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: Dialog fix (/showthread.php?tid=357589)



Dialog fix - zT KiNgKoNg - 07.07.2012

This is a new script im working on but its now showing the dialog when i type /gate at the point

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/gate", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 10,323.4512, 311.1318, 999.5049))
    {
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What Would You Like To Do", "Open\nClose\nInfo", "Select", "Close");
    }
    return 1;
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid) // Lookup the dialogid
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "Your Selected Close");
                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
                {
                    Action(Removed For This Post)
                }
                case 1:
                {
                    Action(Removed For This Post)
                }
                case 2:
                {
                    Action(Removed For This Post)
                }
                // 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.).
}



Re: Dialog fix - [KHK]Khalid - 07.07.2012

What's the problem?


Re: Dialog fix - zT KiNgKoNg - 07.07.2012

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
What's the problem?
The Dialog isn't showing on /gate when in the point of the gate and the range of 9


Re: Dialog fix - zT KiNgKoNg - 09.07.2012

Bump


Re: Dialog fix - RedJohn - 09.07.2012

You are using CreateObject for add gates right?


Re: Dialog fix - zT KiNgKoNg - 09.07.2012

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
You are using CreateObject for add gates right?
Yes i am its just that the dialog aint opening this is an old version iv got a new one that has 1 warning that iv send to iGettey to look at


Re: Dialog fix - RedJohn - 09.07.2012

okey