Guest User

Engine Swaps 1.0.1 Default Config

a guest
Dec 17th, 2021
1,076
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.09 KB | None | 0 0
  1. Config = {}
  2. -- Debug mode. Should not be enabled on a live server!
  3. Config.Debug = false
  4.  
  5. -- Key that will be used for interacting
  6. Config.InteractionKeybind = 'E'
  7.  
  8. -- true = Display values in metric (km/h, kg etc.)
  9. -- false = Display values in imperial (mph, lbs etc.)
  10. Config.UseMetric = true
  11.  
  12. -- Time in ms it takes to prepare a vehicle for engine swap
  13. Config.PrepDuration = 8000
  14.  
  15. -- Time in ms it takes to take out the engine
  16. Config.TakeOutDuration = 10000
  17.  
  18. -- Time in ms it takes to put in a new engine
  19. Config.PutInDuration = 10000
  20.  
  21. -- Time in ms it takes to drop the old engine
  22. Config.EngineDropDuration = 5000
  23.  
  24. -- Time it takes to pickup the new engine
  25. Config.EnginePickupDuration = 6000
  26.  
  27. -- Interval between syncs of all engine swapped vehicles (in ms)
  28. -- Recommended to keep it at minimum of 4000 and maximum of 20000 for big servers with performance issues
  29. Config.SyncInterval = 6000
  30.  
  31. -- Radius in which vehicles with a swapped engine will be synced
  32. -- If you experience server performance loss it is recommended to set it to a lower value
  33. -- I recommend setting this value to at least 8.0, bigger radius will result in a smoother sync
  34. Config.SyncRadius = 15.0
  35.  
  36. -- If this is set to true objects that are used during the swap won't have ownership.
  37. -- If you're having issues with the objects not syncing correctly you can turn it off
  38. Config.DontChangeObjectOwnership = false
  39.  
  40. -- Stop the engine swap if the player working on it dies or goes away from the workshop. Not stopping it might cause problems
  41. Config.StopSwapOnDeath = true
  42.  
  43. -- A stricter way of deleting objects at the workshops, think of engines and engine lifts.
  44. -- If you encounter any issues with objects being deleted unwantedly you can disable this option
  45. Config.StrictObjectDeletion = true
  46.  
  47. -- This value will slightly randomize shipment duration of all engines, shipment duration could be either faster or slower
  48. -- by this value. If you want your shipment durations to always be exactly as specified under the engine set this to 0
  49. Config.ShipmentDurationMutator = 5
  50.  
  51. -- Whether or not to enable the /hood command for opening vehicles hood
  52. Config.UseHoodCommand = true
  53.  
  54. -- When you press the laptop Backspace button twice you'll get to enjoy Snake, if you really don't like fun you can disable it
  55. Config.EnableSnakeMinigame = true
  56.  
  57.  
  58.  
  59. Config.Blacklists = {
  60.     -- Minimum amount of gears needs to have to be able to be engine swaps (electric vehicle have only 1 or 2 gears, making
  61.     -- them super overpowered with a powerful engine.
  62.     MinimumGears = 3,
  63.  
  64.     -- List of vehicle classes which should be blacklisted from getting an engine swap (https://wiki.gtanet.work/index.php?title=Vehicle_Classes)
  65.     Classes = {
  66.         8, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21
  67.     },
  68.  
  69.     -- List of banned vehicle models which may not be swapped
  70.     Models = {
  71.         'voltic',
  72.         'police',
  73.         'police2',
  74.         'police3',
  75.         'police4',
  76.         'sheriff',
  77.         'sheriff2',
  78.         'rcbandito',
  79.         'blazer',
  80.         'blazer2',
  81.     }
  82. }
  83.  
  84.  
  85. -- Animation that is played while preparing a vehicle for an engine swap as well during the end of a swap
  86. Config.RepairAnim = {
  87.     dict = 'mini@repair',
  88.     anim = 'fixing_a_ped',
  89. }
  90.  
  91.  
  92.  
  93. --[[
  94.     Location: location of the workshop (where vehicle is parked) (please try to keep the heading at 0, 90.0, 180.0, or 270.0)
  95.     PlayerWorkshop: Whether or not this is a player workshop (If anyone no matter their job can use it)
  96.     JobWorkshop: Job name that will be able to use the workshop
  97.     StorageName: Internal workshop name, used to save stock/storage in the database
  98.     UseSharedAccount: Whether or not it should use the balance of the job or players money when ordering an engine
  99.     SharedAccount: Name of the shared account that will be used to purchase engines
  100.     Permissions: [
  101.         SwapJobGrade: Grade of job player will need to perform a swap
  102.         PurchaseEngineJobGrade: Grade of job player will need to purchase engines
  103.     ]
  104.     Laptop: Properties of the laptop prop
  105.     Lift: [
  106.         Prop: Properties of the engine lift prop
  107.         ClearArea: If area should be cleared of any props that could be laying around
  108.         ClearRadius: Radius of the area that will be cleared
  109.         Side: Side of the vehicle where the lift will be located (Should always be on the rigth side of the car, if it's not, replace 1 with -1 or -1 with 1)
  110.     ]
  111.     EngineDropoff: [
  112.         ClearArea: If area should be cleared of any props that could be laying around
  113.         ClearRadius: Radius of the area that will be cleared
  114.     ]
  115.     NewEngine: [
  116.         ClearArea: If area should be cleared of any props that could be laying around
  117.         ClearRadius: Radius of the area that will be cleared
  118.     ]
  119.  
  120. --]]
  121. Config.Workshops = {
  122.     {
  123.         location = { x = -222.17, y = -1329.1, z = 30.9, h = 90.0},
  124.  
  125.         playerWorkshop = false,
  126.         jobWorkshop = 'mechanic',
  127.         storageName = 'mechanic',
  128.  
  129.         useSharedAccount = true,
  130.         sharedAccount = 'society_mechanic',
  131.  
  132.         permissions = {
  133.             swapJobGrade = 2,
  134.             purchaseEngineJobGrade = 3,
  135.         },
  136.  
  137.         laptop = {
  138.             prop = {
  139.                 x = -228.7, y = -1329.63, z = 30.85, h = 100.0, model = 'p_laptop_02_s'
  140.             }
  141.         },
  142.         lift = {
  143.             prop = {
  144.                 x = -223.87, y = -1321.5, z = 29.93, h = 90.0, model = 'prop_engine_hoist'
  145.             },
  146.             clearArea = true,
  147.             clearRadius = 10.0,
  148.             side = 1, --    1 for right side of the car, -1 for left side of the car
  149.         },
  150.         engineDropoff = {
  151.             x = -219.7, y = -1321.56, z = 30.93, h = 270.0,
  152.             clearArea = true,
  153.             clearRadius = 3.0,
  154.         },
  155.         newEngine = {
  156.             x = -220.0, y = -1333.2, z = 30.75, h = 300.0,
  157.             clearArea = true,
  158.             clearRadius = 3.0,
  159.         },
  160.     },
  161.     {
  162.         location = { x = 1091.46, y = 1326.53, z = 101.0, h = 270.0},
  163.  
  164.         playerWorkshop = true,
  165.         jobWorkshop = '',
  166.         storageName = '',
  167.  
  168.         useSharedAccount = false,
  169.         sharedAccount = '',
  170.  
  171.         permissions = {
  172.             swapJobGrade = 0,
  173.             purchaseEngineJobGrade = 0,
  174.         },
  175.  
  176.         laptop = {
  177.             prop = {
  178.                 x = 1097.1, y = 1333.42, z = 101.01, h = 270.0, model = 'p_laptop_02_s'
  179.             }
  180.         },
  181.         lift = {
  182.             prop = {
  183.                 x = 1090.96, y = 1333.17, z = 100.01, h = 10.0, model = 'prop_engine_hoist'
  184.             },
  185.             clearArea = true,
  186.             clearRadius = 3.0,
  187.             side = -1, --    change between -1 and 1 to toggle between sides of the car, dependant on workshop heading  | The lift must always be on the right side of the vehicle
  188.             rotation = 1, -- 0 for north/south, 1 for west/east
  189.         },
  190.         engineDropoff = {
  191.             x = 1088.56, y = 1334.12, z = 101.0, h = 0.0,
  192.             clearArea = true,
  193.             clearRadius = 2.0,
  194.         },
  195.         newEngine = {
  196.             x = 1095.97, y = 1323.8, z =  100.785, h = 70.0,
  197.             clearArea = true,
  198.             clearRadius = 2.0,
  199.         },
  200.     }
  201. }
  202.  
  203.  
  204. -- This will be the sound the vehicle makes after you take out the engine and still attempt to start it
  205. Config.NoEngine = {
  206.     sound = 'rcbandito'
  207. }
  208.  
  209. -- Engines will be displayed on the laptop in this order
  210. Config.AvailableEngines = {
  211.     'i4_1.6',
  212.     'i4_1.8',
  213.     'i4_2.0',
  214.     'v6_3.0',
  215.     'v6_3.6',
  216.     'v6_4.0',
  217.     'v6_6.0',
  218.     'v8_4.0',
  219.     'v8_4.3',
  220.     'v8_5.4',
  221.     'v12_5.8',
  222.     'v12_6.0',
  223. }
  224.  
  225. ---------------------------------------------------------------------------------------------
  226. -- <!> ADVANCED <!>
  227. -- If this function is enabled the function responsible for setting the vehicle handling
  228. -- will be switched from the built-in function the function located in editable.lua
  229. -- Do not change this if you do  not what you're doing
  230. Config.UseCustomHandlingSetter = false
  231. ---------------------------------------------------------------------------------------------
  232.  
  233.  
  234. -- Performance multiplier. Could be an easy way to up the performance of all (swapped)engines at the same time
  235. -- without having to configure all engines separately
  236. -- be careful while setting the maxV multiplier as it strongly influences the power in general
  237. Config.PowerMultiplier = 1
  238. Config.MaxVMultiplier = 1
  239.  
  240.  
  241.  
  242. --[[
  243.     -- Engine --
  244.     Value between the square brackets "[ ]" is the so called "key", please do not use any special symbols in the key
  245.     --
  246.     Name: Engine name
  247.     Power: Abstract power rating (acceleration)
  248.     MaxV: Abstract max speed rating (max speed, but also influences acceleration)
  249.     Mass: Weight of the engine in kg
  250.     Displacement: Size of the engine in liters
  251.     PhysicalSize: Abstract value for how big the engine is. Big engines won't fit in small vehicles
  252.     Sound: Model name of the vehicle that the sound will be used for that engine
  253.     Image: name of the image file that will be used for that engine (located in html/img/engines)
  254.     ShipmentDuration: Time in minutes it will take to receive the engine after placing an order (Mutated with the mutator)
  255.     Price: Price of the engine
  256.  
  257.     -- If you edit an existing engine all vehicles with that engine will be updated.
  258.     -- Make sure to never change or remove the engine KEY after players have purchased/equipped it.
  259.         If you really want to remove an engine from the game make sure to delete all mentions of it in the database
  260.         If you just want to make the engine unavailable for future purchase or swap remove it from the Config.AvailableEngines
  261.  
  262. ]]--
  263. Config.Engines = {
  264.     ['i4_1.6'] = {
  265.         name = 'I4 1.6L',
  266.         power = 244,
  267.         maxV = 148.0,
  268.         mass = 155.0,
  269.         displacement = 1.6,
  270.         physicalSize = 1,
  271.         sound = 'blista2',
  272.         image = 'i4_3.png',
  273.         shipmentDuration = 20,
  274.         price = 20000,
  275.     },
  276.     ['i4_1.8'] = {
  277.         name = 'I4 1.8L',
  278.         power = 190,
  279.         maxV = 148.0,
  280.         mass = 164.0,
  281.         displacement = 1.8,
  282.         physicalSize = 1,
  283.         sound = 'rebel',
  284.         image = 'i4_2.png',
  285.         shipmentDuration = 20,
  286.         price = 12000,
  287.     },
  288.     ['i4_2.0'] = {
  289.         name = 'I4 2.0L',
  290.         power = 267,
  291.         maxV = 148.0,
  292.         mass = 154.0,
  293.         displacement = 2.0,
  294.         physicalSize = 1,
  295.         sound = 'sultanrs',
  296.         image = 'i4_1.png',
  297.         shipmentDuration = 20,
  298.         price = 24000,
  299.     },
  300.     ['v6_3.0'] = {
  301.         name = 'V6 3.0L',
  302.         power = 279,
  303.         maxV = 152.0,
  304.         mass = 190.0,
  305.         displacement = 3.0,
  306.         physicalSize = 2,
  307.         sound = 'sentinel3',
  308.         image = 'v6_4.png',
  309.         shipmentDuration = 30,
  310.         price = 32000,
  311.     },
  312.     ['v6_3.6'] = {
  313.         name = 'V6 3.6L',
  314.         power = 315,
  315.         maxV = 152.0,
  316.         mass = 239.0,
  317.         displacement = 3.6,
  318.         physicalSize = 2,
  319.         sound = 'gb200',
  320.         image = 'v6_3.png',
  321.         shipmentDuration = 30,
  322.         price = 36000,
  323.     },
  324.     ['v6_4.0'] = {
  325.         name = 'V6 4.0L',
  326.         power = 324,
  327.         maxV = 155.0,
  328.         mass = 248.0,
  329.         displacement = 4.0,
  330.         physicalSize = 3,
  331.         sound = 'jester3',
  332.         image = 'v6_2.png',
  333.         shipmentDuration = 35,
  334.         price = 39000,
  335.     },
  336.     ['v6_6.0'] = {
  337.         name = 'V6 6.0L',
  338.         power = 335,
  339.         maxV = 156.0,
  340.         mass = 278.0,
  341.         displacement = 6.0,
  342.         physicalSize = 3,
  343.         sound = 'massacro',
  344.         image = 'v6_1.png',
  345.         shipmentDuration = 45,
  346.         price = 42000,
  347.     },
  348.     ['v8_4.0'] = {
  349.         name = 'V8 4.0L',
  350.         power = 332,
  351.         maxV = 161.0,
  352.         mass = 339.0,
  353.         displacement = 4.0,
  354.         physicalSize = 4,
  355.         sound = 'schlagen',
  356.         image = 'v8_3.png',
  357.         shipmentDuration = 60,
  358.         price = 44000,
  359.     },
  360.     ['v8_4.3'] = {
  361.         name = 'V8 4.3L',
  362.         power = 338,
  363.         maxV = 157.0,
  364.         mass = 344.0,
  365.         displacement = 4.3,
  366.         physicalSize = 4,
  367.         sound = 'revolter',
  368.         image = 'v8_2.png',
  369.         shipmentDuration = 70,
  370.         price = 47000,
  371.     },
  372.     ['v8_5.4'] = {
  373.         name = 'V8 5.4L',
  374.         power = 341,
  375.         maxV = 154.0,
  376.         mass = 361.0,
  377.         displacement = 5.4,
  378.         physicalSize = 5,
  379.         sound = 'tulip',
  380.         image = 'v8_1.png',
  381.         shipmentDuration = 75,
  382.         price = 47000,
  383.     },
  384.     ['v12_5.8'] = {
  385.         name = 'V12 5.8L',
  386.         power = 363,
  387.         maxV = 171.0,
  388.         mass = 323.0,
  389.         displacement = 5.8,
  390.         physicalSize = 6,
  391.         sound = 'schafter3',
  392.         image = 'v12_1.png',
  393.         shipmentDuration = 120,
  394.         price = 85000,
  395.     },
  396.     ['v12_6.0'] = {
  397.         name = 'V12 6.0L',
  398.         power = 366,
  399.         maxV = 174.0,
  400.         mass = 334.0,
  401.         displacement = 6.0,
  402.         physicalSize = 6,
  403.         sound = 'osiris',
  404.         image = 'v12_2.png',
  405.         shipmentDuration = 120,
  406.         price = 95000,
  407.     },
  408. }
Advertisement
Add Comment
Please, Sign In to add comment