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
#2

What's the problem?
Reply
#3

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
Reply
#4

Bump
Reply
#5

You are using CreateObject for add gates right?
Reply
#6

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
Reply
#7

okey
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)