Need some help with an algorythm or something :/
#3

Thanks, but what do I do with the other tp dialogs then?
pawn Код:
case 2: //Race
                {
                    for(new i; i<sizeof(tInfo); i++)
                    {
                        if(tInfo[i][tType] == TYPE_RACE)
                        {
                            format(string2, sizeof(string2),    "-%s{00FF00} | {FFFFFF}%s\n", tInfo[i][tName], tInfo[i][tTele]);
                            strcat(string, string2);
                           
                            /*strcat(string,  "-DriftCity{00FF00} | {FFFFFF}/driftcity\n");
                            strcat(string,  "-Karting Race{00FF00} | {FFFFFF}/kart\n");
                            strcat(string,  "-Drag Race 2{00FF00} | {FFFFFF}/drag2\n");*/


                            ShowPlayerDialog(playerid, DIALOG+3, DIALOG_STYLE_LIST,"{FFFF00}Race", string, "Select", "Exit");
                        }
                    }
                }
                case 3: //Nrg
                {
                    for(new i; i<sizeof(tInfo); i++)
                    {
                        if(tInfo[i][tType] == TYPE_NRG)
                        {
                            format(string2, sizeof(string2),    "-%s{00FF00} | {FFFFFF}%s\n", tInfo[i][tName], tInfo[i][tTele]);
                            strcat(string, string2);
                           
                            /*strcat(string,  "-nrg{00FF00} | {FFFFFF}/nrg\n");
                            strcat(string,  "-nrg2{00FF00} | {FFFFFF}/nrg2\n");*/


                            ShowPlayerDialog(playerid, DIALOG+4, DIALOG_STYLE_LIST,"{FFFF00}NRG", string, "Select", "Exit");
                        }
                    }
                }
                case 4: //Backflip
                {
                    for(new i; i<sizeof(tInfo); i++)
                    {
                        if(tInfo[i][tType] == TYPE_BACKFLIP)
                        {
                            format(string2, sizeof(string2),    "-%s{00FF00} | {FFFFFF}%s\n", tInfo[i][tName], tInfo[i][tTele]);
                            strcat(string, string2);
                           
                            /*strcat(string,  "-Oil backflip{00FF00} | {FFFFFF}/backflip1\n");*/
                           
                            ShowPlayerDialog(playerid, DIALOG+5, DIALOG_STYLE_LIST,"{FFFF00}BackFlip", string, "Select", "Exit");
                        }
                    }
                }
                case 5: //Base Jumps
                {
                    for(new i; i<sizeof(tInfo); i++)
                    {
                        if(tInfo[i][tType] == TYPE_BASEJUMP)
                        {
                            format(string2, sizeof(string2),    "-%s{00FF00} | {FFFFFF}%s\n", tInfo[i][tName], tInfo[i][tTele]);
                            strcat(string, string2);
                           
                            /*strcat(string,  "Base Jump 1{00FF00} | {FFFFFF}/jump1\n");
                            strcat(string,  "Base Jump 2{00FF00} | {FFFFFF}/jump2\n");
                            strcat(string,  "Base Jump 3{00FF00} | {FFFFFF}/jump3\n");
                            strcat(string,  "Base Jump 4{00FF00} | {FFFFFF}/jump4\n");
                            strcat(string,  "Base Jump 5{00FF00} | {FFFFFF}/jump5\n");
                            strcat(string,  "Base Jump 6{00FF00} | {FFFFFF}/jump6\n");
                            strcat(string,  "Base Jump 7{00FF00} | {FFFFFF}/jump7\n");
                            strcat(string,  "Base Jump 8{00FF00} | {FFFFFF}/jump8\n");
                            strcat(string,  "Base Jump 9{00FF00} | {FFFFFF}/jump9\n");
                            strcat(string,  "Base Jump 10{00FF00} | {FFFFFF}/jump10\n");
                            strcat(string,  "Base Jump 11{00FF00} | {FFFFFF}/jump11\n");*/


                            ShowPlayerDialog(playerid, DIALOG+6, DIALOG_STYLE_LIST,"{FFFF00}Base Jumps", string, "Select", "Exit");
                        }
                    }
                }
                case 6: //Other
                {
                    for(new i; i<sizeof(tInfo); i++)
                    {
                        if(tInfo[i][tType] == TYPE_OTHER)
                        {
                            format(string2, sizeof(string2),    "-%s{00FF00} | {FFFFFF}%s\n", tInfo[i][tName], tInfo[i][tTele]);
                            strcat(string, string2);
                            /*
                            strcat(string,  "Chill-Island{00FF00} | {FFFFFF}/island\n");
                            strcat(string,  "MT Chilliad{00FF00} | {FFFFFF}/chilliad\n");
                            strcat(string,  "Trampoline{00FF00} | {FFFFFF}/bounce\n");
                            strcat(string,  "Coaster 1{00FF00} | {FFFFFF}/coaster1\n");
                            strcat(string,  "Coaster 2{00FF00} | {FFFFFF}/coaster2\n");
                            strcat(string,  "Pipes{00FF00} | {FFFFFF}/pipe\n");
                            strcat(string,  "Parachute Drop{00FF00} | {FFFFFF}/pd\n");
                            strcat(string,  "Cannon{00FF00} | {FFFFFF}/cannon\n");
                            strcat(string,  "HeavensDrop{00FF00} | {FFFFFF}/hd\n");
                            strcat(string,  "GlassBowl{00FF00} | {FFFFFF}/bowl\n");*/


                            ShowPlayerDialog(playerid, DIALOG+7, DIALOG_STYLE_LIST,"{FFFF00}Other", string, "Select", "Exit");
                        }
                    }
                }
pawn Код:
if(dialogid == DIALOG+3) // Race
    {
        if(!response)return 1;
        for(new i; i<sizeof(tInfo); i++)
        {
            if(tInfo[i][tType] == TYPE_STUNT)
            {
                AddPlayerTeleport(playerid, tInfo[i+listitem-1][tName], tInfo[i+listitem-1][tx], tInfo[i+listitem-1][ty], tInfo[i+listitem-1][tz], tInfo[i+listitem-1][tTimeH], tInfo[i+listitem-1][tTimeM], tInfo[i+listitem-1][tVehicleRemove], tInfo[i+listitem-1][tWeapon], tInfo[i+listitem-1][tAmmo]);

        /*switch (listitem)
        {
            case 0: AddPlayerTeleport(playerid, "Drift City", -1025.1023,1019.2966,2.9941, 12, 0, false, -1, -1);
            case 1: AddPlayerTeleport(playerid, "Kart Race", 2570.8005,1893.9918,10.8280, 12, 0, false, -1, -1);
            case 2: AddPlayerTeleport(playerid, "Drag Race 2", 2041.580688,-3113.884277,6.142639, 12, 0, false, -1, -1);*/

            }
        }
    }

    if(dialogid == DIALOG+4) // NRG
    {
        if(!response)return 1;
        /*switch (listitem)
        {*/

        for(new i; i<sizeof(tInfo); i++)
        {
            if(tInfo[i][tType] == TYPE_STUNT || tInfo[i][tType] == TYPE_RACE)
            {
                AddPlayerTeleport(playerid, tInfo[i+listitem-1][tName], tInfo[i+listitem-1][tx], tInfo[i+listitem-1][ty], tInfo[i+listitem-1][tz], tInfo[i+listitem-1][tTimeH], tInfo[i+listitem-1][tTimeM], tInfo[i+listitem-1][tVehicleRemove], tInfo[i+listitem-1][tWeapon], tInfo[i+listitem-1][tAmmo]);
               
            /*case 0: AddPlayerTeleport(playerid, "Nrg course 1", 2784.3462,-2518.5698,13.6319, 12, 0, true, -1, -1);
            case 1: AddPlayerTeleport(playerid, "Nrg course 2", 2798.9404,-1643.3833,28.5625, 12, 0, true, -1, -1);*/

            }
        }
    }
   
    if(dialogid == DIALOG+5) // BackFlip
    {
        if(!response)return 1;
        for(new i; i<sizeof(tInfo); i++)
        {
            if(tInfo[i][tType] == TYPE_STUNT || tInfo[i][tType] == TYPE_RACE || tInfo[i][tType] == TYPE_NRG)
            {
                AddPlayerTeleport(playerid, tInfo[i+listitem-1][tName], tInfo[i+listitem-1][tx], tInfo[i+listitem-1][ty], tInfo[i+listitem-1][tz], tInfo[i+listitem-1][tTimeH], tInfo[i+listitem-1][tTimeM], tInfo[i+listitem-1][tVehicleRemove], tInfo[i+listitem-1][tWeapon], tInfo[i+listitem-1][tAmmo]);
            }
        }
        /*switch(listitem)
        {
            case 0: AddPlayerTeleport(playerid, "Oil BackFlip, do not turn left or right!", 151.1787109375, 1339.357421875, 10.246315002441, 12, 0, true, -1, -1);
        }*/

    }

    if(dialogid == DIALOG+6) // Basejumps
    {
        if(!response)return 1;
        for(new i; i<sizeof(tInfo); i++)
        {
            if(tInfo[i][tType] == TYPE_STUNT || tInfo[i][tType] == TYPE_RACE || tInfo[i][tType] == TYPE_NRG || tInfo[i][tType] == TYPE_BACKFLIP)
            {
                AddPlayerTeleport(playerid, tInfo[i+listitem-1][tName], tInfo[i+listitem-1][tx], tInfo[i+listitem-1][ty], tInfo[i+listitem-1][tz], tInfo[i+listitem-1][tTimeH], tInfo[i+listitem-1][tTimeM], tInfo[i+listitem-1][tVehicleRemove], tInfo[i+listitem-1][tWeapon], tInfo[i+listitem-1][tAmmo]);
            }
        }
        /*switch (listitem)
        {
            case 0: AddPlayerTeleport(playerid, "Base Jump 1", 1961.4845,1920.7383,131.1122, 12, 0, true, 46, 1);
            case 1: AddPlayerTeleport(playerid, "Base Jump 2", 1562.7367,-1346.4706,330.0493, 12, 0, true, 46, 1);
            case 2: AddPlayerTeleport(playerid, "Base Jump 3", 1592.8718,-1221.6572,278.0506, 12, 0, true, 46, 1);
            case 3: AddPlayerTeleport(playerid, "Base Jump 4", 1661.2975,-1247.3594,233.9873, 12, 0, true, 46, 1);
            case 4: AddPlayerTeleport(playerid, "Base Jump 5", 1436.8242,-1053.2672,213.8473, 12, 0, true, 46, 1);
            case 5: AddPlayerTeleport(playerid, "Base Jump 6", -861.6122,2307.6626,159.9215, 12, 0, true, 46, 1);
            case 6: AddPlayerTeleport(playerid, "Base Jump 7", -755.6661,2041.5369,83.1339, 12, 0, true, 46, 1);
            case 7: AddPlayerTeleport(playerid, "Base Jump 8", -1280.3628,978.4018,148.2734, 12, 0, true, 46, 1);
            case 8: AddPlayerTeleport(playerid, "Base Jump 9", -1668.3292,884.1396,138.3281, 12, 0, true, 46, 1);
            case 9: AddPlayerTeleport(playerid, "Base Jump 10", -1807.4314,574.6566,245.9893, 12, 0, true, 46, 1);
            case 10: AddPlayerTeleport(playerid, "Base Jump 11", -2669.7974,1595.3375,217.2739, 12, 0, true, 46, 1);
        }*/

    }

    if(dialogid == DIALOG+7)  // Other
    {
        if(!response)return 1;
        for(new i; i<sizeof(tInfo); i++)
        {
            if(tInfo[i][tType] == TYPE_STUNT || tInfo[i][tType] == TYPE_RACE || tInfo[i][tType] == TYPE_NRG || tInfo[i][tType] == TYPE_BACKFLIP || tInfo[i][tType] == TYPE_BASEJUMP)
            {
                AddPlayerTeleport(playerid, tInfo[i+listitem-1][tName], tInfo[i+listitem-1][tx], tInfo[i+listitem-1][ty], tInfo[i+listitem-1][tz], tInfo[i+listitem-1][tTimeH], tInfo[i+listitem-1][tTimeM], tInfo[i+listitem-1][tVehicleRemove], tInfo[i+listitem-1][tWeapon], tInfo[i+listitem-1][tAmmo]);
            }
        }
        /*switch (listitem)
        {
            case 0: AddPlayerTeleport(playerid, "Chill-Island", 261.1905,-3271.4392,5.7316, 21, 0, true, -1, -1);
            case 1: AddPlayerTeleport(playerid, "MT Chilliad", -2358.1282,-1631.2905,486.5476, 12, 0, false, 46, 1);
            case 2: AddPlayerTeleport(playerid, "Trampoline", 1977.0219726563,-1272.712890625,4363.1166992188, 12, 0, false, -1, -1);
            case 3: AddPlayerTeleport(playerid, "Coaster 1", 3394.7490234375,-2858.6318359375,586.51507568359, 12, 0, false, -1, -1);
            case 4: AddPlayerTeleport(playerid, "Coaster 2", 35.38744354248,-900.32940673828,1761.6329345703, 12, 0, false, -1, -1);
            case 5: AddPlayerTeleport(playerid, "Pipes", 2672.00830100,-1076.75427200,301.88580300, 12, 0, false, 46, 1);
            case 6: AddPlayerTeleport(playerid, "Parachute Drop", 3075.26,-2053.21,355.5, 8, 0, true, 46, 1);
            case 7: AddPlayerTeleport(playerid, "The Cannon", -556.0517,2580.0288,65.8368, 12, 0, true, -1, -1);
            case 8: AddPlayerTeleport(playerid, "Heavens Drop", 3425.0229,-1048.2330,1465.5647, 12, 0, false, -1, -1);
            case 9: AddPlayerTeleport(playerid, "Huge Glass Bowl", -219.1842,-618.2765,117.4826, 12, 0, true, -1, -1);
        }*/

    }
?
sorry for all the comments
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)