Why Dialog Close?
#1

First of all, All my filterscript are return 0; Dialog are all in different ID's. What could be the problem everytime I do /duel then choose something in the list. It close. Nothing happen. What could be the problem?

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
    {
        switch(dialogid)
        {
            case LOGIN_DIALOG :
            {
                if(strlen(inputtext) < MIN_PASS_LEN || strlen(inputtext) > MAX_PASS_LEN || strlen(inputtext) == 0)
                {
                    SendClientMessage(playerid, WHITE, "{FF0000}>> Invalid password lengh!");
                    ShowPlayerLoginDialog(playerid);
                }
                else CheckPlayerPassword(playerid, inputtext);
                return 1;
            }
            case REGISTER_DIALOG :
            {
                if(strlen(inputtext) < MIN_PASS_LEN || strlen(inputtext) > MAX_PASS_LEN || strlen(inputtext) == 0)
                {
                    SendClientMessage(playerid, WHITE, "{FF0000}Invalid password lengh!");
                    ShowPlayerRegisterDialog(playerid);
                }
                else CreateAccount(playerid, inputtext);
                return 1;
            }
            case VEHICLE_DIALOG :
            {
                switch (listitem)
                {
                    case 0 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+1, DIALOG_STYLE_LIST, "Airplanes", "Andromada\nAT-400\nBeagle\nCropduster\nDodo\nNevada\nRustler\nShamal\nSkimmer\nStuntplane", "Select", "Back" );
                    case 1 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+2, DIALOG_STYLE_LIST, "Helicopters", "Cargobob\nLeviathan\nMaverick\nNews Maverick\nPolice Maverick\nRaindance\nSeasparrow\nSparrow", "Select", "Back" );
                    case 2 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+3, DIALOG_STYLE_LIST, "Bikes", "BF-400\nBike\nBMX\nFaggio\nFCR-900\nFreeway\nMountain Bike\nNRG-500\nPCJ-600\nPizzaboy\nQuad\nSanchez\nWayfarer", "Select", "Back" );
                    case 3 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+4, DIALOG_STYLE_LIST, "Convertibles", "Comet\nFeltzer\nStallion\nWindsor", "Select", "Back" );
                    case 4 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+5, DIALOG_STYLE_LIST, "Industrial", "Benson\nBobcat\nBurrito\nBoxville\nBoxburg\nCement Truck\nDFT-30\nFlatbed\nLinerunner\nMule\nNewsvan\nPacker\nPetrol Tanker\nPony\nRoadtrain\nRumpo\nSadler\nSadler Shit\nTopfun\nTractor\nTrashmaster\nUtility Van\nWalton\nYankee\nYosemite", "Select", "Back" );
                    case 5 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+6, DIALOG_STYLE_LIST, "Lowriders", "Blade\nBroadway\nRemington\nSavanna\nSlamvan\nTahoma\nTornado\nVoodoo", "Select", "Back" );
                    case 6 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+7, DIALOG_STYLE_LIST, "Off Road", "Bandito\nBF Injection\nDune\nHuntley\nLandstalker\nMesa\nMonster\nMonster A\nMonster B\nPatriot\nRancher A\nRancher B\nSandking", "Select", "Back" );
                    case 7 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+8, DIALOG_STYLE_LIST, "Public Service Vehicles", "Ambulance\nBarracks\nBus\nCabbie\nCoach\nCop Bike (HPV-1000)\nEnforcer\nFBI Rancher\nFBI Truck\nFiretruck\nFiretruck LA\nPolice Car (LSPD)\nPolice Car (LVPD)\nPolice Car (SFPD)\nRanger\nRhino\nS.W.A.T\nTaxi", "Select", "Back" );
                    case 8 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+9, DIALOG_STYLE_LIST, "Saloons", "Admiral\nBloodring Banger\nBravura\nBuccaneer\nCadrona\nClover\nElegant\nElegy\nEmperor\nEsperanto\nFortune\nGlendale Shit\nGlendale\nGreenwood\nHermes\nIntruder\nMajestic\nManana\nMerit\nNebula\nOceanic\nPicador\nPremier\nPrevion\nPrimo\nSentinel\nStafford\nSultan\nSunrise\nTampa\nVincent\nVirgo\nWillard\nWashington", "Select", "Back" );
                    case 9 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+10, DIALOG_STYLE_LIST, "Sport Vehicles", "Alpha\nBanshee\nBlista Compact\nBuffalo\nBullet\nCheetah\nClub\nEuros\nFlash\nHotring Racer\nHotring Racer A\nHotring Racer B\nInfernus\nJester\nPhoenix\nSabre\nSuper GT\nTurismo\nUranus\nZR-350", "Select", "Back" );
                    case 10 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+11, DIALOG_STYLE_LIST, "Station Wagons", "Moonbeam\nPerenniel\nRegina\nSolair\nStratum", "Select", "Back" );
                    case 11 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+12, DIALOG_STYLE_LIST, "Boats", "Coastguard\nDinghy\nJetmax\nLaunch\nMarquis\nPredator\nReefer\nSpeeder\nSquallo\nTropic", "Select", "Back" );
                    case 12 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+13, DIALOG_STYLE_LIST, "Trailers", "Article Trailer\nArticle Trailer 2\nArticle Trailer 3\nBaggage Trailer A\nBaggage Trailer B\nFarm Trailer\nPetrol Trailer\nStairs Trailer\nUtility Trailer", "Select", "Back" );
                    case 13 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+14, DIALOG_STYLE_LIST, "Unique Vehicles", "Baggage\nBrownstreak (Train)\nCaddy\nCamper\nCamper A\nCombine Harvester\nDozer\nDumper\nForklift\nFreight (Train)\nHotknife\nHustler\nHotdog\nKart\nMower\nMr Whoopee\nRomero\nSecuricar\nStretch\nSweeper\nTram\nTowtruck\nTug\nVortex", "Select", "Back" );
                    case 14 : ShowPlayerDialog( playerid, VEHICLE_DIALOG+15, DIALOG_STYLE_LIST, "RC Vehicles", "RC Bandit\nRC Baron\nRC Raider\nRC Goblin\nRC Tiger\nRC Cam", "Select", "Back" );
                }
            }
            case VEHICLE_DIALOG+1 :
            {
                if (listitem > 9)
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }

                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);

                new
                   model_array[] = { 592, 577, 511, 512, 593, 553, 476, 519, 460, 513 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+2 :
            {
                if ( listitem > 7 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);

                new
                    model_array[] = { 548, 417, 487, 488, 497, 563, 447, 469 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+3 :
            {
                if ( listitem > 12 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);

                new
                    model_array[] = { 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 471, 468, 586 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+4 :
            {
                if ( listitem > 3)
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 480, 533, 439, 555 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+5 :
            {
                if ( listitem > 24 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+6 :
            {
                if ( listitem > 7 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 536, 575, 534, 567, 535, 566, 576, 412 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+7 :
            {
                if ( listitem > 12 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 495 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+8 :
            {
                if ( listitem > 17 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 598, 597, 599, 432, 601, 420 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+9 :
            {
                if ( listitem > 33 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+10 :
            {
                if ( listitem > 19 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+11 :
            {
                if ( listitem > 4 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 418, 404, 479, 458, 561 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+12 :
            {
                if ( listitem > 9 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+13 :
            {
                if ( listitem > 8 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 435, 450, 591, 606, 607, 610, 584, 608, 611 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+14 :
            {
                if ( listitem > 23 )
                {
                    ShowPlayerVehicleSpawnDialog(playerid);
                    return 1;
                }
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 485, 537, 457, 483, 508, 532, 486, 406, 530, 538, 434, 545, 588, 571, 572, 423, 442, 428, 409, 574, 449, 525, 583, 539 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            case VEHICLE_DIALOG+15 :
            {
                if ( listitem > 5 ) return ShowPlayerVehicleSpawnDialog( playerid );
                if(PlayerInfo[playerid][Vehicle] != -1) DestroyVehicle(PlayerInfo[playerid][Vehicle]);
                new
                    model_array[] = { 441, 464, 465, 501, 564, 594 };

                CarSpawner(playerid, model_array[listitem]);
                return 1;
            }
            #if USE_VIP_SYSTEM == true
            case VTOYS_DIALOG :
            {
                switch( listitem )
                {
                    case 0:
                    {
                        for(new i = 0; i < 5; i++)
                            if(IsPlayerAttachedObjectSlotUsed(playerid, i))
                                RemovePlayerAttachedObject(playerid, i);

                        SetPlayerAttachedObject(playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785);
                    }
                    case 1:
                    {
                        for ( new i = 0; i < 5; i++ )
                            if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
                                RemovePlayerAttachedObject( playerid, i );

                        SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 );
                        SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 );
                    }
                    case 2:
                    {
                        for ( new i = 0; i < 5; i++ )
                            if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
                                RemovePlayerAttachedObject( playerid, i );

                        SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                        SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                        SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 );
                    }
                    case 3:
                    {
                        for ( new i = 0; i < 5; i++ )
                            if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
                                RemovePlayerAttachedObject( playerid, i );

                        SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                        SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                        SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                        SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
                        SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 );
                    }
                    case 4:
                    {
                        if(!IsPlayerAttachedObjectSlotUsed( playerid, 0  ) &&
                            !IsPlayerAttachedObjectSlotUsed( playerid, 1  ) &&
                            !IsPlayerAttachedObjectSlotUsed( playerid, 2  ) &&
                            !IsPlayerAttachedObjectSlotUsed( playerid, 3  ) &&
                            !IsPlayerAttachedObjectSlotUsed( playerid, 4  ) )
                            return SendClientMessage(playerid, WHITE, "{FF0000}>> You are not holding any toys" );
                        for ( new i = 0; i < 5; i ++ )
                        {
                            if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
                            {
                                RemovePlayerAttachedObject( playerid, i );
                                SendClientMessage( i, WHITE, "{FF0000}>> You removed all attached toys" );
                            }
                        }
                    }
                }
            }
            #endif
        }
        return 1;
    }
    else if(!response)
    {
        switch(dialogid)
        {
            case LOGIN_DIALOG :
            {
                ShowPlayerLoginDialog(playerid);
                return 1;
            }
            case REGISTER_DIALOG :
            {
                ShowPlayerRegisterDialog(playerid);
                return 1;
            }
            case VEHICLE_DIALOG:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+1:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+2:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+3:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+4:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+5:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+6:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+7:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+8:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+9:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+10:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+11:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+12:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+13:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+14:{ShowPlayerVehicleSpawnDialog(playerid);}
            case VEHICLE_DIALOG+15:{ShowPlayerVehicleSpawnDialog(playerid);}
        }
    }
    if(dialogid == DUELDIAG)
    {
            if(response)
            {
                switch(listitem)
                {
                    case 0: //Choose player
                    {
                    ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "Select a player", "Type in the name/playerid of the player you want\nto invite to a duel\nNOTE: You can enter partial names", "Continue", "Back");
                    }
                    case 1: //Choose Duel location
                    {
                            format(diagstr, sizeof(diagstr), "ID\tDuel Name\n");
                            for(new x=0; x<MAX_DUELS; x++)
                            {
                                    format(dFile, sizeof(dFile), DUELFILES, x);
                                    if(strlen(dini_Get(dFile, "duelName")) > 0) format(diagstr, sizeof(diagstr), "%s%d\t%s\n", diagstr, x, dini_Get(dFile, "duelName"));
                                    else format(diagstr, sizeof(diagstr), "%s%d\tEmpty Slot\n", diagstr, x);
                            }
                            ShowPlayerDialog(playerid, DUELDIAG+2, DIALOG_STYLE_LIST, "Duel List", diagstr, "Select", "Exit");
                            return 1;
                    }
                    case 2: //Choose weapons
                    {
                        ShowPlayerDialog(playerid, DUELDIAG+5, DIALOG_STYLE_LIST, "Select Weapon Slot", "Slot 1\nSlot 2\nSlot 3", "Select", "Back");
                    }
                    case 3: //Choose Duel Money
                    {
                        ShowPlayerDialog(playerid, DUELDIAG+4, DIALOG_STYLE_INPUT, "Set Bet Amount", "Set the bet amount for the duel.\nThe winner takes the money and the loser\nloses this amount of money", "Set", "Back");
                    }
                    case 4: //Send invitation
                    {
                        new str[80];
                        new dPID = GetPVarInt(playerid, "dPID");
                        new dBet = GetPVarInt(playerid, "dBet");
                        new dLoc = GetPVarInt(playerid, "dLoc");
                        new dWep[3], key[7];
                        for(new x=0; x<=2; x++)
                        {
                                format(key, sizeof(key), "dWep%d", x);
                                dWep[x] = GetPVarInt(playerid, key);
                        }
                        format(str, sizeof(str), "invite %d %d %d %d %d %d", dPID, dBet, dLoc, dWep[0], dWep[1], dWep[2]);
                        return cmd_duel(playerid, str);
                    }
                    case 5: //Cancel invitation
                    {
                        return SendClientMessage(playerid, COLOR_DUEL, "Duel invite was canceled, duel settings were saved");
                    }
                }
            }
    }
    if(dialogid == DUELDIAG+1)
    {
            if(response)
            {
                new invitee;
                if(sscanf(inputtext, "u", invitee)) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "Select a player", "Type in the Name/PlayerID of the player you want\nto invite to a duel\nNOTE: You can enter partial names", "Continue", "Back");
                if(invitee == INVALID_PLAYER_ID) return ShowPlayerDialog(playerid, DUELDIAG+1, DIALOG_STYLE_INPUT, "Select a player", "The player specified is not connected, try again\nType in the Name/PlayerID of the player you want\nto invite to a duel\nNOTE: You can enter partial names", "Continue", "Back");
                SetPVarInt(playerid, "dPID", invitee);
                ShowDuelSettingsDialog(playerid);
            }
                else ShowDuelSettingsDialog(playerid);
    }
    if(dialogid == DUELDIAG+2)
    {
                if(response)
                {
                        format(dFile, sizeof(dFile), DUELFILES, listitem-1);
                        if(!dini_Exists(dFile)) return OnDialogResponse(playerid, DUELDIAG, 1, 1, "blank");
                        SetPVarInt(playerid, "dLoc", listitem-1);
                        ShowDuelSettingsDialog(playerid);
                }
                else ShowDuelSettingsDialog(playerid);
    }
    if(dialogid == DUELDIAG+4) //Duel money
    {
                if(response)
                {
                new amount;

                if(sscanf(inputtext, "d", amount)) return ShowPlayerDialog(playerid, DUELDIAG+4, DIALOG_STYLE_INPUT, "Set Bet Amount", "Enter the bet amount for the duel\nThe winner takes the money and the loser\nloses this amount of money", "Set", "Back");
                if(amount < 500) return ShowPlayerDialog(playerid, DUELDIAG+4, DIALOG_STYLE_INPUT, "Set Bet Amount", "Bet amount must be higher than $300\nSet the bet amount for the duel\nThe winner takes the money and the loser\nloses this amount of money", "Set", "Back");
                SetPVarInt(playerid, "dBet", amount);
                ShowDuelSettingsDialog(playerid);
                }
                else ShowDuelSettingsDialog(playerid);
    }
    if(dialogid == DUELDIAG+5) //Weapon slots
    {
            if(response)
                {
                        SetPVarInt(playerid, "dWSlot", listitem);
                        ShowPlayerDialog(playerid, DUELDIAG+6, DIALOG_STYLE_LIST, "Choose a weapon", "Brass Knuckles\nGolf Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nDildo\nVibrator\nFlowers\nCane\nGrenade\nTeargas\nMolotov\nColt 45\nSilenced Pistol\nDeagle\nShotgun\nSawns\nSpas\nUzi\nMP5\nAK47\nM4\nTec9\nRifle\nSniper", "Select", "Back");
                }
                else ShowDuelSettingsDialog(playerid);
    }
    if(dialogid == DUELDIAG+6)
    {
            if(response)
            {
                new key[7];
                format(key, sizeof(key), "dWep%d", GetPVarInt(playerid, "dWSlot"));
                switch(listitem)
                {
                    case 13..15:
                    {
                        ShowPlayerDialog(playerid, DUELDIAG+6, DIALOG_STYLE_LIST, "Choose a weapon", "Brass Knuckles\nGolf Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nDildo\nVibrator\nFlowers\nCane\nGrenade\nTeargas\nMolotov\nColt 45\nSilenced Pistol\nDeagle\nShotgun\nSawns\nSpas\nUzi\nMP5\nAK47\nM4\nTec9\nRifle\nSniper", "Select", "Back");
                        return SendClientMessage(playerid, WHITE, "{FF0000}>> This weapon is disabled!");
                    }
                }
                switch(listitem)
                {
                    case 0: SetPVarInt(playerid, key, 1);
                    case 1: SetPVarInt(playerid, key, 2);
                    case 2: SetPVarInt(playerid, key, 3);
                    case 3: SetPVarInt(playerid, key, 4);
                    case 4: SetPVarInt(playerid, key, 5);
                    case 5: SetPVarInt(playerid, key, 6);
                    case 6: SetPVarInt(playerid, key, 7);
                    case 7: SetPVarInt(playerid, key, 8);
                    case 8: SetPVarInt(playerid, key, 9);
                    case 9: SetPVarInt(playerid, key, 10);
                    case 10: SetPVarInt(playerid, key, 11);
                    case 11: SetPVarInt(playerid, key, 14);
                    case 12: SetPVarInt(playerid, key, 15);
                    case 13: SetPVarInt(playerid, key, 16);
                    case 14: SetPVarInt(playerid, key, 17);
                    case 15: SetPVarInt(playerid, key, 18);
                    case 16: SetPVarInt(playerid, key, 22);
                    case 17: SetPVarInt(playerid, key, 23);
                    case 18: SetPVarInt(playerid, key, 24);
                    case 19: SetPVarInt(playerid, key, 25);
                    case 20: SetPVarInt(playerid, key, 26);
                    case 21: SetPVarInt(playerid, key, 27);
                    case 22: SetPVarInt(playerid, key, 28);
                    case 23: SetPVarInt(playerid, key, 29);
                    case 24: SetPVarInt(playerid, key, 30);
                    case 25: SetPVarInt(playerid, key, 31);
                    case 26: SetPVarInt(playerid, key, 32);
                    case 27: SetPVarInt(playerid, key, 33);
                    case 28: SetPVarInt(playerid, key, 34);
                }
                ShowDuelSettingsDialog(playerid);
            }
            else ShowDuelSettingsDialog(playerid);
    }
    if(dialogid == DUELDIAG+7)
    {
        if(response)
        {
            if(!IsPlayerInDuel(diagitem[listitem])) return 1;
            SetPlayerSpectatingDuel(playerid, diagitem[listitem]);
        }
        else return 1;
    }
    return 0;
}
Reply
#2

Need your help guys. Also If I separate duel script to a filterscript it just works. It response.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)