Guest User

Untitled

a guest
Nov 2nd, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.22 KB | None | 0 0
  1. availableTuningMarkers = {
  2.     --X, Y, Z, Vehicle Rotation (Use /markerpos to get perfect position and rotation (The command in sourceC.lua last row))
  3.     {-2416.4360351563, -604.05352783203, 132.5625}, -- LV Airport
  4.     {1320.4631347656, 1380.7529296875, 10.445365905762, 342.06317138672},
  5.     {2124.7734375, -1133.2369384766, 25.152503967285},  -- Autóker
  6. }
  7.  
  8. tuningMenu = {
  9.     [1] = {
  10.         ["categoryName"] = getLocalizedText("menu.performance"),
  11.         ["subMenu"] = {
  12.             [1] = {
  13.                 ["categoryName"] = getLocalizedText("menu.performance.engine"),
  14.                 ["cameraSettings"] = {"bonnet_dummy", 110, 15, 6, true}, -- component, offsetX, offsetZ, zoom, hide component
  15.                 ["upgradeData"] = "engine",
  16.                 ["subMenu"] = {
  17.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"engineAcceleration"}, {"maxVelocity"}}},
  18.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 1500, ["tuningData"] = {{"engineAcceleration", 2}, {"maxVelocity", 30}}},
  19.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 3000, ["tuningData"] = {{"engineAcceleration", 6}, {"maxVelocity", 40}}},
  20.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 6000, ["tuningData"] = {{"engineAcceleration", 8}, {"maxVelocity", 45}}},
  21.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"engineAcceleration", 18}, {"maxVelocity", 65}}},
  22.                 }
  23.             },
  24.             [2] = {
  25.                 ["categoryName"] = getLocalizedText("menu.performance.turbo"),
  26.                 ["cameraSettings"] = {"bonnet_dummy", 110, 15, 6, true},
  27.                 ["upgradeData"] = "turbo",
  28.                 ["subMenu"] = {
  29.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"engineInertia"}}},
  30.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 6000, ["tuningData"] = {{"engineInertia", -18}}},
  31.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 12000, ["tuningData"] = {{"engineInertia", -25}}},
  32.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 18000, ["tuningData"] = {{"engineInertia", -33}}},
  33.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"engineInertia", -49}}},
  34.                 }
  35.             },
  36.             [3] = {
  37.                 ["categoryName"] = getLocalizedText("menu.performance.nitro"),
  38.                 ["cameraSettings"] = {"boot_dummy", -65, 15, 6, true},
  39.                 ["upgradeData"] = "nitro",
  40.                 ["subMenu"] = {
  41.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.remove"), ["tuningPrice"] = 0, ["tuningData"] = 0},
  42.                     [2] = {["categoryName"] = "25%", ["tuningPrice"] = 10000, ["tuningData"] = 25},
  43.                     [3] = {["categoryName"] = "50%", ["tuningPrice"] = 15000, ["tuningData"] = 50},
  44.                     [4] = {["categoryName"] = "75%", ["tuningPrice"] = 25000, ["tuningData"] = 75},
  45.                     [5] = {["categoryName"] = "100%", ["tuningPrice"] = 30000, ["tuningData"] = 100},
  46.                 }
  47.             },
  48.             [4] = {
  49.                 ["categoryName"] = getLocalizedText("menu.performance.ecu"),
  50.                 ["cameraSettings"] = {"bonnet_dummy", 110, 15, 6, true},
  51.                 ["upgradeData"] = "ecu",
  52.                 ["subMenu"] = {
  53.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"engineAcceleration"}, {"maxVelocity"}}},
  54.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 1500, ["tuningData"] = {{"engineAcceleration", 2}, {"maxVelocity", 20}}},
  55.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 3000, ["tuningData"] = {{"engineAcceleration", 4}, {"maxVelocity", 30}}},
  56.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 6000, ["tuningData"] = {{"engineAcceleration", 6}, {"maxVelocity", 40}}},
  57.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"engineAcceleration", 12}, {"maxVelocity", 53}}},
  58.                 }
  59.             },
  60.             [5] = {
  61.                 ["categoryName"] = getLocalizedText("menu.performance.tires"),
  62.                 ["cameraSettings"] = {"wheel_rb_dummy", 60, 10, 4},
  63.                 ["upgradeData"] = "tires",
  64.                 ["subMenu"] = {
  65.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"tractionMultiplier"}, {"tractionLoss"}}},
  66.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 4500, ["tuningData"] = {{"tractionMultiplier", 0.05}, {"tractionLoss", 0.02}}},
  67.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 9000, ["tuningData"] = {{"tractionMultiplier", 0.1}, {"tractionLoss", 0.03}}},
  68.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 12500, ["tuningData"] = {{"tractionMultiplier", 0.15}, {"tractionLoss", 0.04}}},
  69.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"tractionMultiplier", 0.25}, {"tractionLoss", 0.05}}},
  70.  
  71.                 }
  72.             },
  73.             [6] = {
  74.                 ["categoryName"] = getLocalizedText("menu.performance.brakes"),
  75.                 ["cameraSettings"] = {"wheel_rf_dummy", 35, 5, 2, true},
  76.                 ["upgradeData"] = "brakes",
  77.                 ["subMenu"] = {
  78.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"brakeDeceleration"}, {"brakeBias"}}},
  79.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 4500, ["tuningData"] = {{"brakeDeceleration", 0.05}, {"brakeBias", 0.1}}},
  80.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 9000, ["tuningData"] = {{"brakeDeceleration", 0.1}, {"brakeBias", 0.175}}},
  81.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 12500, ["tuningData"] = {{"brakeDeceleration", 0.15}, {"brakeBias", 0.25}}},
  82.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"brakeDeceleration", 0.27}, {"brakeBias", 0.37}}},
  83.                 }
  84.             },
  85.             [7] = {
  86.                 ["categoryName"] = getLocalizedText("menu.performance.weightReduction"),
  87.                 ["upgradeData"] = "weightreduction",
  88.                 ["subMenu"] = {
  89.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"mass"}}},
  90.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 4250, ["tuningData"] = {{"mass", -100}}},
  91.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 7500, ["tuningData"] = {{"mass", -200}}},
  92.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 15000, ["tuningData"] = {{"mass", -300}}},
  93.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"mass", -400}}},
  94.                 }
  95.             },
  96.             [8] = {
  97.                 ["categoryName"] = getLocalizedText("menu.performance.gearbox"),
  98.                 ["upgradeData"] = "gearbox",
  99.                 ["subMenu"] = {
  100.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = {{"engineAcceleration"}, {"maxVelocity"}}},
  101.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.1"), ["tuningPrice"] = 1500, ["tuningData"] = {{"engineAcceleration", 2}, {"maxVelocity", 15}}},
  102.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.2"), ["tuningPrice"] = 3000, ["tuningData"] = {{"engineAcceleration", 4}, {"maxVelocity", 20}}},
  103.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.3"), ["tuningPrice"] = 6000, ["tuningData"] = {{"engineAcceleration", 6}, {"maxVelocity", 26}}},
  104.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.4"), ["tuningPrice"] = 50000, ["tuningData"] = {{"engineAcceleration", 12}, {"maxVelocity", 40}}}
  105.                 }
  106.             }
  107.         }
  108.     },
  109.     [2] = {
  110.         ["categoryName"] = getLocalizedText("menu.optical"),
  111.         ["availableUpgrades"] = {}, -- automatic getting optical upgrades to selected category
  112.         ["subMenu"] = {
  113.             [1] = {["categoryName"] = getLocalizedText("menu.optical.frontBumper"), ["upgradeSlot"] = 14, ["tuningPrice"] = 1000, ["cameraSettings"] = {"bump_front_dummy", 130, 10, 6}},
  114.             [2] = {["categoryName"] = getLocalizedText("menu.optical.rearBumper"), ["upgradeSlot"] = 15, ["tuningPrice"] = 1000, ["cameraSettings"] = {"door_lf_dummy", -65, 3, 8}},
  115.             [3] = {["categoryName"] = getLocalizedText("menu.optical.hood"), ["upgradeSlot"] = 0, ["tuningPrice"] = 1000},
  116.             [4] = {["categoryName"] = getLocalizedText("menu.optical.exhaust"), ["upgradeSlot"] = 13, ["tuningPrice"] = 2000, ["cameraSettings"] = {"door_lf_dummy", -65, 3, 8}},
  117.             [5] = {["categoryName"] = getLocalizedText("menu.optical.spoiler"), ["upgradeSlot"] = 2, ["tuningPrice"] = 1500, ["cameraSettings"] = {"boot_dummy", -65, 3, 8}},
  118.             [6] = {["categoryName"] = getLocalizedText("menu.optical.wheels"), ["upgradeSlot"] = 12, ["tuningPrice"] = 5000},
  119.             [7] = {["categoryName"] = getLocalizedText("menu.optical.sideSkirt"), ["upgradeSlot"] = 3, ["tuningPrice"] = 1000, ["cameraSettings"] = {"ug_wing_right", 65, 3, 4}},
  120.             [8] = {["categoryName"] = getLocalizedText("menu.optical.roofScoop"), ["upgradeSlot"] = 7, ["tuningPrice"] = 1000},
  121.             [9] = {["categoryName"] = getLocalizedText("menu.optical.hidraulics"), ["upgradeSlot"] = 9, ["tuningPrice"] = 15000},
  122.             [10] = { -- custom optical item
  123.                 ["categoryName"] = "Air-Ride",
  124.                 ["cameraSettings"] = {"wheel_rf_dummy", 35, 5, 2, true},
  125.                 ["upgradeSlot"] = 17,
  126.                 ["subMenu"] = {
  127.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.remove"), ["tuningPrice"] = 0, ["tuningData"] = false},
  128.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.install"), ["tuningPrice"] = 20000, ["tuningData"] = true}
  129.                 }
  130.             },
  131.             [11] = { -- custom optical item
  132.                 ["categoryName"] = getLocalizedText("menu.optical.lampColor"),
  133.                 ["cameraSettings"] = {"bonnet_dummy", 90, 3, 13},
  134.                 ["upgradeSlot"] = 18,
  135.                 ["subMenu"] = {
  136.                     [1] = {["categoryName"] = getLocalizedText("menu.optical.lampColor"), ["tuningPrice"] = 2500, ["tuningData"] = "headlight"},
  137.                 }
  138.             },
  139.             [12] = { -- custom optical item
  140.                 ["categoryName"] = "Neon",
  141.                 ["cameraSettings"] = {"chassis_dummy", 0, 3, 10},
  142.                 ["upgradeSlot"] = 19,
  143.                 ["subMenu"] = {
  144.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.remove"), ["tuningPrice"] = 0, ["tuningData"] = false},
  145.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.1"), ["tuningPrice"] = 5000, ["tuningData"] = "white"},
  146.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.2"), ["tuningPrice"] = 5000, ["tuningData"] = "blue"},
  147.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.3"), ["tuningPrice"] = 5000, ["tuningData"] = "green"},
  148.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.4"), ["tuningPrice"] = 5000, ["tuningData"] = "red"},
  149.                     [6] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.5"), ["tuningPrice"] = 5000, ["tuningData"] = "yellow"},
  150.                     [7] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.6"), ["tuningPrice"] = 5000, ["tuningData"] = "pink"},
  151.                     [8] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.7"), ["tuningPrice"] = 5000, ["tuningData"] = "orange"},
  152.                     [9] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.8"), ["tuningPrice"] = 5000, ["tuningData"] = "lightblue"},
  153.                     [10] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.9"), ["tuningPrice"] = 5000, ["tuningData"] = "rasta"},
  154.                     [11] = {["categoryName"] = getLocalizedText("tuningPack.optical.neon.10"), ["tuningPrice"] = 5000, ["tuningData"] = "ice"},
  155.                 }
  156.             },
  157.         }
  158.     },
  159.     [3] = {
  160.         ["categoryName"] = getLocalizedText("menu.extras"),
  161.         ["subMenu"] = {
  162.             [1] = {
  163.                 ["categoryName"] = getLocalizedText("menu.extras.frontWheelSize"),
  164.                 ["cameraSettings"] = {"bump_front_dummy", 105, 5, 5, true},
  165.                 ["subMenu"] = {
  166.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.veryNarrow"), ["tuningPrice"] = 20000, ["tuningData"] = "verynarrow"},
  167.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.narrow"), ["tuningPrice"] = 10000, ["tuningData"] = "narrow"},
  168.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 5000, ["tuningData"] = "default"},
  169.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.wide"), ["tuningPrice"] = 10000, ["tuningData"] = "wide"},
  170.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.veryWide"), ["tuningPrice"] = 20000, ["tuningData"] = "verywide"}
  171.                 }
  172.             },
  173.             [2] = {
  174.                 ["categoryName"] = getLocalizedText("menu.extras.rearWheelSize"),
  175.                 ["cameraSettings"] = {"bump_rear_dummy", -90, 5, 5, true},
  176.                 ["subMenu"] = {
  177.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.veryNarrow"), ["tuningPrice"] = 20000, ["tuningData"] = "verynarrow"},
  178.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.narrow"), ["tuningPrice"] = 10000, ["tuningData"] = "narrow"},
  179.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 5000, ["tuningData"] = "default"},
  180.                     [4] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.wide"), ["tuningPrice"] = 10000, ["tuningData"] = "wide"},
  181.                     [5] = {["categoryName"] = getLocalizedText("tuningPack.wheelSize.veryWide"), ["tuningPrice"] = 20000, ["tuningData"] = "verywide"}
  182.                 }
  183.             },
  184.             [3] = {
  185.                 ["categoryName"] = getLocalizedText("menu.extras.offroad"),
  186.                 ["subMenu"] = {
  187.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 2500, ["tuningData"] = "default"},
  188.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.offroad.dirt"), ["tuningPrice"] = 5000, ["tuningData"] = "dirt"},
  189.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.offroad.sand"), ["tuningPrice"] = 5000, ["tuningData"] = "sand"}
  190.                 }
  191.             },
  192.             [4] = {
  193.                 ["categoryName"] = getLocalizedText("menu.extras.driveType"),
  194.                 ["propertyName"] = "driveType",
  195.                 ["subMenu"] = {
  196.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.driveType.front"), ["tuningPrice"] = 10000, ["tuningData"] = "fwd"},
  197.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.driveType.all"), ["tuningPrice"] = 10000, ["tuningData"] = "awd"},
  198.                     [3] = {["categoryName"] = getLocalizedText("tuningPack.driveType.rear"), ["tuningPrice"] = 10000, ["tuningData"] = "rwd"}
  199.                 }
  200.             },
  201.             [5] = {
  202.                 ["categoryName"] = getLocalizedText("menu.extras.bulletproofTires"),
  203.                 ["cameraSettings"] = {"wheel_rb_dummy", 60, 10, 4},
  204.                 ["subMenu"] = {
  205.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = false},
  206.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.bulletproofTires"), ["tuningPrice"] = 85000, ["tuningData"] = true}
  207.                 }
  208.             },
  209.             [6] = {
  210.                 ["categoryName"] = getLocalizedText("menu.extras.lsdDoor"),
  211.                 ["subMenu"] = {
  212.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 0, ["tuningData"] = false},
  213.                     [2] = {["categoryName"] = getLocalizedText("menu.extras.lsdDoor"), ["tuningPrice"] = 35000, ["tuningData"] = true}
  214.                 }
  215.             },
  216.             [7] = {
  217.                 ["categoryName"] = getLocalizedText("menu.extras.steeringLock"),
  218.                 ["propertyName"] = "steeringLock",
  219.                 ["subMenu"] = {
  220.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.0"), ["tuningPrice"] = 7500, ["tuningData"] = false},
  221.                     [2] = {["categoryName"] = "30°", ["tuningPrice"] = 7500, ["tuningData"] = 30},
  222.                     [3] = {["categoryName"] = "40°", ["tuningPrice"] = 7500, ["tuningData"] = 40},
  223.                     [4] = {["categoryName"] = "50°", ["tuningPrice"] = 7500, ["tuningData"] = 50},
  224.                     [5] = {["categoryName"] = "60°", ["tuningPrice"] = 7500, ["tuningData"] = 60}
  225.                 }
  226.             },
  227.             [8] = {
  228.                 ["categoryName"] = getLocalizedText("menu.extras.numberplate"),
  229.                 ["cameraSettings"] = {"wheel_lb_dummy", -65, 4, 5},
  230.                 ["subMenu"] = {
  231.                     [1] = {["categoryName"] = getLocalizedText("tuningPack.numberplate.random"), ["tuningPrice"] = 75000, ["tuningData"] = "random"},
  232.                     [2] = {["categoryName"] = getLocalizedText("tuningPack.numberplate.custom"), ["tuningPrice"] = 150000, ["tuningData"] = "custom"}
  233.                 }
  234.             },
  235.         }
  236.     },
  237.     [4] = {
  238.         ["categoryName"] = getLocalizedText("menu.color"),
  239.         ["subMenu"] = {}
  240.     }
  241. }
  242.  
  243. function getMainCategoryIDByName(name)
  244.     if name then
  245.         for categoryID, row in ipairs(tuningMenu) do
  246.             if name == row["categoryName"] then
  247.                 return categoryID
  248.             end
  249.         end
  250.     end
  251.    
  252.     return -1
  253. end
Advertisement
Add Comment
Please, Sign In to add comment