Dialog not continueing
#1

So, I have a problem. In my script, at dialog ID 689 when I put something as inputtext, the dialog just disappears, doesn't send me back to dialog ID 689 again as how it should work.. Anyone information for me about this?

pawn Код:
if(dialogid == 689) // Vehicle2
    {
        if(response)
        {
            new model = strval(inputtext);
            if(model < 400)
                return ShowPlayerDialog(playerid, 689, DIALOG_STYLE_INPUT, "Vehicle", "Please enter a vehicle ID from 400 to 611.", "Create", "Cancel");
            if(model > 611)
                return ShowPlayerDialog(playerid, 689, DIALOG_STYLE_INPUT, "Vehicle", "Please enter a vehicle ID from 400 to 611.", "Create", "Cancel");
            if(model == 425 || model == 432 || model == 476 || model == 447 || model == 537 || model == 538 || model == 569 || model == 570 || model == 584 || model == 590 || model == 591 || model == 606 || model == 607 || model == 608 || model == 610 || model == 611 || model == 441 || model == 464 || model == 465 || model == 501 || model == 564 || model == 594 || model == 435 || model == 449 || model == 450)
            {
                SendClientMessage(playerid, 0xE21F1FFF, "Those vehicles are restricted!");
                ShowPlayerDialog(playerid, 689, DIALOG_STYLE_INPUT, "Vehicle", "Please enter a vehicle ID from 400 to 611.", "Create", "Cancel");
                return 1;
            }
            if(IsPlayerConnected(playerid))
            {
            SetupHouseInfo[playerid][SetupCarModel2] = model;
            IsSettingUpVehicle2[playerid] = true;
            ShowPlayerDialog(playerid, 255, DIALOG_STYLE_MSGBOX, "Vehicle Setup", "Go to the position you want your vehicle to spawn, then type /confirm.", "Select", "Cancel");
            return 1;
            }
        }
        else
        {
            ShowPlayerDialog(playerid, 668, DIALOG_STYLE_LIST, "House Setup", "Entrance\nName\nDescription\nInterior\nVehicle\nVehicle2\nRent\nPurchase", "Select", "Cancel");
            return 1;
        }
    }
Reply
#2

Try this
pawn Код:
if(dialogid == 689) // Vehicle2
{
    if(response)
    {
        if(strlen(inputtext) > 0)
        {
            new model = strval(inputtext);
            if(400 <= model <= 611)
            {
                ShowPlayerDialog(playerid, 689, DIALOG_STYLE_INPUT, "Vehicle", "Please enter a vehicle ID from 400 to 611.", "Create", "Cancel"); return 1;
            }
            switch(model)
            {
                case 425,432,476,447,537,538,569,570,584,590,591,606,607,608,610,611,441,464,465,501,564,594,435,449,450:
                {
                    SendClientMessage(playerid, 0xE21F1FFF, "Those vehicles are restricted!");
                    ShowPlayerDialog(playerid, 689, DIALOG_STYLE_INPUT, "Vehicle", "Please enter a vehicle ID from 400 to 611.", "Create", "Cancel");
                    return 1;
                }
            }
            SetupHouseInfo[playerid][SetupCarModel2] = model;
            IsSettingUpVehicle2[playerid] = true;
            ShowPlayerDialog(playerid, 255, DIALOG_STYLE_MSGBOX, "Vehicle Setup", "Go to the position you want your vehicle to spawn, then type /confirm.", "Select", "Cancel");
            return 1;
        }
    }
    else
    {
        ShowPlayerDialog(playerid, 668, DIALOG_STYLE_LIST, "House Setup", "Entrance\nName\nDescription\nInterior\nVehicle\nVehicle2\nRent\nPurchase", "Select", "Cancel"); return 1;
    }
}
Also dont use numbers in dialogs, at top of the script at #defines add #define Vehicle2 689
Reply
#3

try to use switch
Reply
#4

Still does nothing after I insert the vehicle ID..
Reply
#5

Maybe messed up dialog ids ?
Reply
#6

No, Dialog ID's are correct.
Reply
#7

That script is in your gamemode or in a filterscript?
Reply
#8

Filterscript.
Reply
#9

In server.cfg, put your dialog filterscript first or second to work.
Example:
WRONG:
Код:
filterscripts o.O fff sexfs chuck_norris YOUR_DIALOG_FS
CORRECT:
Код:
filterscripts YOUR_DIALOG_FS o.O fff sexfs chuck_norris
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)