Dialog fix
#1

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.).
}
Reply


Messages In This Thread
Dialog fix - by zT KiNgKoNg - 07.07.2012, 18:20
Re: Dialog fix - by [KHK]Khalid - 07.07.2012, 18:45
Re: Dialog fix - by zT KiNgKoNg - 07.07.2012, 19:04
Re: Dialog fix - by zT KiNgKoNg - 09.07.2012, 10:22
Re: Dialog fix - by RedJohn - 09.07.2012, 10:40
Re: Dialog fix - by zT KiNgKoNg - 09.07.2012, 10:48
Re: Dialog fix - by RedJohn - 09.07.2012, 11:00

Forum Jump:


Users browsing this thread: 2 Guest(s)