Advertisement
DonSamuele

Untitled

Sep 18th, 2023 (edited)
598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.28 KB | None | 0 0
  1. DS_Gas_Stations_Config = {
  2.  
  3.     Target = false, -- false or 'qtarget' / 'ox_target' / 'qb-target'
  4.  
  5.     SaveTime = 300000, --SAVE GAS STATION DATA EVERY 5 MINUTES
  6.  
  7.     CreateGasStationCommand = 'creategasstation',
  8.  
  9.     RemoveGasStationCommand = 'removegasstation',
  10.  
  11.     DefaultGasolinePrice = 2,
  12.  
  13.     ElectricFee = 1, --HOW MUCH GAS STATION OWNERS PAY FOR EACH ELECTRIC "LITER" REFUEL
  14.  
  15.     DefaultElectricPrice = 2,
  16.  
  17.     DefaultJerrycanPrice = 100,
  18.  
  19.     StarterFuel = 100, --STARTER FUEL AUTOMATICALLY GIVEN WHEN YOU CREATE A GAS STATION
  20.  
  21.     StarterBalance = 0, --STARTER GAS STATION BALANCE AUTOMATICALLY GIVEN WHEN YOU CREATE IT
  22.  
  23.     DefaultStationName = 'Gas Station',
  24.  
  25.     DefaultPed = "ig_lestercrest", --ONLY FOR TARGET INTERACTIONS (https://wiki.rage.mp/index.php?title=Peds)
  26.  
  27.     Trailer = "tanker",
  28.  
  29.     EnterAutomatically = true, --SHOULD PED GO TO TRUCK AND ENTER AUTOMATICALLY?
  30.  
  31.     TruckRefillPositions = { --YOU CAN ADD UNLIMITED TRUCK ROUTES AND ONE WILL BE RANDOMLY SELECTED
  32.         vec3(2740.778, 1430.162, 24.49718),
  33.         vec3(2705.248, 1572.2, 24.51665),
  34.         vec3(1216.854, 1872.909, 78.92651)
  35.     },
  36.  
  37.     MaxJerrycanPrice = 500, --MAX JERRYCAN PRICE THAT GAS STATION OWNERS CAN SET
  38.  
  39.     MaxGasolinePrice = 10, --MAX FUEL PRICE THAT GAS STATION OWNERS CAN SET
  40.  
  41.     MaxElectricPrice = 5, --MAX FUEL PRICE THAT GAS STATION OWNERS CAN SET
  42.  
  43.     RefuelWait = 1000, --WAIT TIME FOR EACH LITER IN MILLISECONDS
  44.  
  45.     RopeLenght = 3.5,
  46.  
  47.     RopeMaxLenght = 5.0,
  48.  
  49.     PumpProps = {
  50.         `prop_gas_pump_1d`,
  51.         `prop_gas_pump_1a`,
  52.         `prop_gas_pump_1b`,
  53.         `prop_gas_pump_1c`,
  54.         `prop_vintage_pump`,
  55.         `prop_gas_pump_old2`,
  56.         `prop_gas_pump_old3`
  57.     },
  58.  
  59.     SellPercent = 50, --SELL GAS STATION 50% LESS THAN ORIGINAL PRICE
  60.  
  61.     FuelDecor = 'FUEL', --YOU DON'T NEED TO CHANGE THIS
  62.  
  63.     ElectricVehicles = { --ELECTRIC VEHICLES LIST
  64.         "neon",
  65.         "raiden",
  66.         "caddy",
  67.         "caddy2",
  68.         "caddy3",
  69.         "cyclone",
  70.         "dilettante",
  71.         "dilettante2",
  72.         "surge",
  73.         "tezeract",
  74.         "imorgon",
  75.         "khamelion",
  76.         "voltic",
  77.         "iwagen"
  78.     },
  79.  
  80.     rpmUsage = {
  81.         [1.0] = 1.4,
  82.         [0.9] = 1.2,
  83.         [0.8] = 1.0,
  84.         [0.7] = 0.9,
  85.         [0.6] = 0.8,
  86.         [0.5] = 0.7,
  87.         [0.4] = 0.5,
  88.         [0.3] = 0.4,
  89.         [0.2] = 0.2,
  90.         [0.1] = 0.1,
  91.         [0.0] = 0.0,
  92.     },
  93.  
  94.     VehicleClasses = { --VEHICLE CATEGORY, RECOMMENDED FUEL, FUEL USAGE
  95.         [0] = 1.0, --COMPACT
  96.         [1] = 1.0, --SEDAN
  97.         [2] = 1.0, --SUV
  98.         [3] = 1.0, --COUPE
  99.         [4] = 1.0, --MUSCLE
  100.         [5] = 1.0, --SPORT CLASSIC
  101.         [6] = 1.0, --SPORT
  102.         [7] = 1.0, --SUPER
  103.         [8] = 1.0, --MOTORCYCLE
  104.         [9] = 1.0, --OFF-ROAD
  105.         [10] = 1.0, --INDUSTRIAL
  106.         [11] = 1.0, --UTILITY
  107.         [12] = 1.0, --VANS
  108.         [14] = 1.0, --BOAT
  109.         [15] = 1.0, --HELICOPTER
  110.         [16] = 1.0, --PLANE
  111.         [17] = 1.0, --SERVICE
  112.         [18] = 1.0, --EMERGENCY
  113.         [19] = 1.0, --MILITARY
  114.         [20] = 1.0, --COMMERCIAL
  115.         [22] = 1.0, --OPEN WHEEL
  116.     },
  117.  
  118.     stationLevels = {
  119.         ["1"] = {
  120.            capacity = 400,
  121.            price = 0
  122.         },
  123.         ["2"] = {
  124.            capacity = 800,
  125.            price = 5000,
  126.         },
  127.         ["3"] = {
  128.            capacity = 1200,
  129.            price = 10000,
  130.         }
  131.     },
  132.  
  133.     statisticsBarriers = {0, 2500, 5000, 7500, 10000},
  134.  
  135.     vehicles = {
  136.        { id = 1, name = 'Hauler', model = 'hauler', price = 10000, sellPrice = 2500, capacity = 200, image = 'hauler.png'},
  137.        { id = 2, name = 'Phantom', model = 'phantom', price = 10000, sellPrice = 3000, capacity = 400, image = 'phantom.png'},
  138.     },
  139.  
  140.     Translations = {
  141.         ["no_permissions"] = "You don't have permissions to do that.",
  142.         ["hired"] = "You was hired in this gas station!",
  143.         ["station"] = "Gas Station",
  144.         ["open_menu"] = "[E] - Open Menu",
  145.         ["create_station"] = "Create Gas Station",
  146.         ["create_desc"] = "Create a new gas station!",
  147.         ["create_input"] = "Set Gas Station Management Position",
  148.         ["cancel"] = "Cancel",
  149.         ["accept"] = "Accept",
  150.         ["delete"] = "Delete",
  151.         ["create_truck_input"] = "Set Truck Spawn Position",
  152.         ["changed_name"] = "You have successfully changed your gas station name to '%s'!",
  153.         ["amount"] = "Amount",
  154.         ["amount_min"] = "Amount must be atleast 1",
  155.         ["amount_err"] = "Amount can not be more than balance",
  156.         ["err_price"] = "Max price can be %s%s",
  157.         ["dash_desc"] = "You can manage your station here",
  158.         ["owner"] = "Owner",
  159.         ["employee"] = "Employee",
  160.         ["s_employee"] = "Select a employee",
  161.         ["s_create"] = "Create Station",
  162.         ["s_create_desc"] = "Create a new station",
  163.         ["confirm"] = "Are you sure?",
  164.         ["b_station"] = "Buy Station",
  165.         ["s_station"] = "Sell Station",
  166.         ["c_fuel"] = "Current Fuel",
  167.         ["max_fuel"] = "Max Fuel",
  168.         ["refuel_desc"] = "You can refuel your vehicle here.",
  169.         ["h_employee"] = "Hire Employee",
  170.         ["h_employee_desc"] = "Hire a new Employee",
  171.         ["f_employee"] = "Fire Employee",
  172.         ["name"] = "Name",
  173.         ["fire"] = "Fire",
  174.         ["hire"] = "Hire",
  175.         ["role"] = "Role",
  176.         ["save"] = "Save",
  177.         ["date"] = "Date",
  178.         ["type"] = "Type",
  179.         ["by"] = "By",
  180.         ["status"] = "Status",
  181.         ["create"] = "Create",
  182.         ["reward"] = "Reward",
  183.         ["perms"] = "Permissions",
  184.         ["sel_vehicle"] = "Select a vehicle",
  185.         ["shipment"] = "Shipment",
  186.         ["d_shipment"] = "Delete Shipment",
  187.         ["a_shipment"] = "Accept Shipment",
  188.         ["c_shipment"] = "Create Shipment",
  189.         ["c_shipment_desc"] = "Create a shipment",
  190.         ["completed_ship"] = "Completed Shipments",
  191.         ["exceed_capacity"] = "You can't create a shipment that will exceed maximum tanker capacity",
  192.         ["change_g_price"] = "Change Gasoline Price",
  193.         ["change_g_price_d"] = "Change Station's Gasoline Price per liter",
  194.         ["change_e_price"] = "Change Electric Price",
  195.         ["change_e_price_d"] = "Change Station's Electric Price per watt",
  196.         ["vehicle"] = "Vehicle",
  197.         ["vehicles"] = "Vehicles",
  198.         ["overview"] = "Overview",
  199.         ["deposit"] = "Deposit",
  200.         ["withdraw"] = "Withdraw",
  201.         ["s_name"] = "Station Name",
  202.         ["s_name_err"] = "Station Name must be atleast 5 characters",
  203.         ["s_name_title"] = "Change Station Name",
  204.         ["s_name_desc"] = "Your Station's name is a unique identifier for your station",
  205.         ["m_deposit"] = "Deposit Money",
  206.         ["m_deposit_desc"] = "You are about to deposit money to this station. This action cannot be undone",
  207.         ["m_withdraw"] = "Withdraw Money",
  208.         ["m_withdraw_desc"] = "You are about to withdraw money from this station. This action cannot be undone",
  209.         ["balance"] = "Balance",
  210.         ["tot_balance"] = "total balance",
  211.         ["tot_capacity"] = "total capacity",
  212.         ["transactions"] = "Transactions",
  213.         ["pricing"] = "Pricing",
  214.         ["employees"] = "Employees",
  215.         ["employee_perms"] = "Change Permissions",
  216.         ["employee_perms_desc"] = "Change employee's Permissions.",
  217.         ["buy_vehicle"] = "Buy Vehicle",
  218.         ["buy_vehicle_c"] = "Confirm Buy Vehicle",
  219.         ["sell_vehicle"] = "Sell Vehicle",
  220.         ["sell_vehicle_c"] = "Confirm Sell Vehicle",
  221.         ["upgrade"] = "Upgrade",
  222.         ["tanker"] = "Tanker",
  223.         ["upgrade_tanker"] = "Upgrade Tanker",
  224.         ["upgrade_desc"] = "You are about to upgrade the station. This action cannot be undone",
  225.         ["electric_fee"] = "Electric Fee (per transaction)",
  226.         ["m1"] = "Jan",
  227.         ["m2"] = "Feb",
  228.         ["m3"] = "Mar",
  229.         ["m4"] = "Apr",
  230.         ["m5"] = "May",
  231.         ["m6"] = "Jun",
  232.         ["m7"] = "Jul",
  233.         ["m8"] = "Aug",
  234.         ["m9"] = "Sep",
  235.         ["m10"] = "Oct",
  236.         ["m11"] = "Nov",
  237.         ["m12"] = "Dec",
  238.         ["price"] = "Price",
  239.         ["custom_ped"] = "Custom Ped (optional)",
  240.         ["s_fuel"] = "Starter Fuel (optional)",
  241.         ["s_balance"] = "Starter Balance (optional)",
  242.         ["s_fuelprice"] = "Fuel Price (optional)",
  243.         ["remove_station"] = "Remove Closest Gas Station",
  244.         ["remove_desc"] = "Note, this action is irreversible!",
  245.         ["remove_input"] = "Remove '%s' Gas Station?",
  246.         ["not_found"] = "No Gas Stations Found. [R] - Cancel",
  247.         ["max_price"] = "The maximum price you can put is %s%s!",
  248.         ["come_here"] = "Come here to refuel the vehicle.",
  249.         ["changed_price"] = "You changed the fuel price to %s%s!",
  250.         ["no_money"] = "You don't have enough money",
  251.         ["no_money_station"] = "The gas station doesn't have enough money",
  252.         ["deposited"] = "You deposited %s%s into the gas station account!",
  253.         ["withdrawn"] = "You withdraw %s%s from the gas station account!",
  254.         ["bought"] = "You have bought the gas station!",
  255.         ["sold"] = "You sold your gas station successfully for %s%s!",
  256.         ["refuel_input"] = "Refuel Vehicle",
  257.         ["refuel_veh"] = "Refuel vehicle",
  258.         ["buy_jerry"] = "Buy Jerrycan",
  259.         ["buy_jerry_desc"] = "Purchase a new Jerrycan.",
  260.         ["jerry_price"] = "Change Jerrycan Price",
  261.         ["jerry_price_desc"] = "Change Station's Jerrycan price",
  262.         ["p_jerrycan"] = "per jerry can",
  263.         ["p_liter"] = "per liter",
  264.         ["p_watt"] = "per watt",
  265.         ["refueled"] = "Vehicle refueled successfully!",
  266.         ["no_fuel"] = "The gas station doesn't have %s liters of fuel.",
  267.         ["no_vehicle"] = "No vehicle nearby.",
  268.         ["jerry_confirm"] = "Are you sure you want buy a jerrycan for %s%s?",
  269.         ["mission_failed"] = "Mission failed!",
  270.         ["mission_completed"] = "Mission completed, you have refueled the gas station!",
  271.         ["no_trailer"] = "~r~YOU NEED TO ATTACH THE TRAILER",
  272.         ["go_position"] = "~w~Go To The Marked ~y~Position",
  273.         ["go_back"] = "~w~Go Back To The ~y~Gas Station",
  274.         ["go_truck"] = "~w~Get In The ~y~Truck",
  275.         ["refueling_truck"] = "~g~Refueling Truck...",
  276.         ["refueling_veh"] = "Refueling Vehicle...",
  277.         ["refuel"] = "Refuel",
  278.         ["no_truck"] = "~r~YOU NEED TO BE IN YOUR ASSIGNED TRUCK",
  279.         ["attach_pump"] = "~w~[~g~E~w~] Attach Pump",
  280.         ["detach_pump"] = "~w~[~g~E~w~]Detach Pump",
  281.         ["jerrycan"] = "Jerrycan",
  282.         ["refill_jerry"] = "~w~[~g~E~w~] Refill",
  283.         ["refill_info"] = "Vehicle Fuel: %s liters",
  284.         ["not_authorized"] = "You are not authorized",
  285.         ["currency"] = "$",
  286.     }
  287. }
  288.  
  289. DS_Gas_Stations_Config.Notification = function(msg)
  290.     BeginTextCommandThefeedPost('STRING')
  291.     AddTextComponentSubstringPlayerName(msg)
  292.     EndTextCommandThefeedPostTicker(0, 1)
  293. end
  294.  
  295. DS_Gas_Stations_Config.Draw3DText = function(x, y, z, text)
  296.     SetTextScale(0.325, 0.325)
  297.     SetTextFont(4)
  298.     SetTextProportional(1)
  299.     SetTextColour(255, 255, 255, 215)
  300.     SetTextEntry("STRING")
  301.     SetTextCentre(true)
  302.     AddTextComponentString(text)
  303.     SetDrawOrigin(x,y,z, 0)
  304.     DrawText(0.0, 0.0)
  305.     local factor = (string.len(text)) / 370
  306.     DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 68)
  307.     ClearDrawOrigin()
  308. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement