Accessible code
Config = {
Locale = 'en',
DebugZone = false,
FrameworkName = IsESX() and 'es_extended' or 'qb-core',
Commands = {
creator = {
name = 'screator',
help = 'Command that allows you to create ownable Gas Station',
restricted = 'group.admin'
},
delete = {
name = 'deleteStation',
help = 'Command that allows you to delete desired Gas Station',
restricted = 'group.admin'
},
update = {
name = 'updateStation',
help = 'Command that allows you to edit existing Gas Station'
}
},
}
Discord = {
url = '', -- url here
title = 'Server Name',
/*
https://www.spycolor.com/
['default'] = 14423100,
['blue'] = 255,
['red'] = 16711680,
['green'] = 65280,
['white'] = 16777215,
['black'] = 0,
['orange'] = 16744192,
['yellow'] = 16776960,
['pink'] = 16761035,
['lightgreen'] = 65309,
*/
color = 65309, -- green
imageUrl = 'https://cdn.discordapp.com/attachments/1126197898439295066/1129791542379434004/discord_banner_uniq.png', -- optional, if you dont want it put ''
}
local oxinv = GetResourceState('ox_inventory'):find('start')
local qsinv = GetResourceState('qs-inventory'):find('start')
local qbinv = GetResourceState('qb-inventory'):find('start')
local psinv = GetResourceState('ps-inventory'):find('start')
local codem = GetResourceState('codem-inventory'):find('start')
local lj = GetResourceState('lj-inventory'):find('start')
function OpenStash(name)
if oxinv then
exports.ox_inventory:openInventory('stash', name)
end
end
function Notify(msg, type)
lib.notify({
description = msg,
type = type,
position = 'bottom'
})
end
function GetVehFuel(veh)
return GetVehicleFuelLevel(veh)
end
-- you can put here export from your script if needed
function FuelVehicle(vehicle, level)
SetVehicleFuelLevel(vehicle, level)
end
RegisterNetEvent('uniq_fuel:Notify', Notify)
function HasMoney(source, price)
if IsESX() then
return ESX.GetPlayerFromId(source)?.getMoney() >= price
elseif IsQBCore() then
return QBCore.Functions.GetPlayer(source)?.Functions.GetMoney('cash') >= price
end
return false
end
function RemoveMoney(source, amount)
if IsESX() then
ESX.GetPlayerFromId(source).removeMoney(amount)
elseif IsQBCore() then
QBCore.Functions.GetPlayer(source)?.Functions.RemoveMoney('cash', amount, '')
end
end
function AddMoney(source, amount)
if IsESX() then
ESX.GetPlayerFromId(source).addMoney(amount)
elseif IsQBCore() then
QBCore.Functions.GetPlayer(source)?.Functions.AddMoney('cash', amount, '')
end
end
function GetIdenitfier(source)
if IsESX() then
return ESX.GetPlayerFromId(source).identifier
elseif IsQBCore() then
return QBCore.Functions.GetPlayer(source)?.PlayerData.citizenid
end
end
local oxinv = GetResourceState('ox_inventory'):find('start')
local qsinv = GetResourceState('qs-inventory'):find('start')
local qbinv = GetResourceState('qb-inventory'):find('start')
local psinv = GetResourceState('ps-inventory'):find('start')
local codem = GetResourceState('codem-inventory'):find('start')
local lj = GetResourceState('lj-inventory'):find('start')
function RegisterStash(name)
if oxinv then
local slots = 100 * 1000
local weight = 100 * 1000
exports.ox_inventory:RegisterStash(name, name, slots, weight)
end
end
lib.callback.register('uniq_fuel:checkMoney', function(source, price)
return HasMoney(source, price)
end)
Locales['en'] = {
creator_ui_controls = {
('E - Add new point \n'),
('X - Position of Boss Menu \n'),
('BACKSPACE - Undo last step \n'),
('ARROW UP - Increase height \n'),
('ARROW DOWN - Decrease height \n'),
('ENTER - Finish creating \n'),
('ESC - Cancel')
},
creator_pump_ui = {
('E - Position for pump \n'),
('ESC - Cancel \n'),
('ENTER - Finish creating \n'),
},
creator_alert = 'Fuel Station Creator',
creator_alert_message = 'You will need to setup area for station',
notify = {
outside_pol = 'Coords are outside polygon',
no_points = 'Set up points first, minimal 3',
no_pumps = 'You didnt set up any pump location',
boss_menu = 'You didn\'t choose position for boss menu',
tank_full = 'This tank is full',
no_sales = 'No sales yet',
no_more_fuel = 'No more fuel in pump tank',
fueled = 'You have fueled %s for $%s',
no_veh_nearby = 'No vehicle nearby',
not_enough_money = 'You don\'t have enough money',
already_fueling = 'Already fueling',
someone_using_pump = 'Somebody else is using this pump right now',
no_stations_to_delete = 'No Gas Stations to delete',
no_stations_to_edit = 'No Gas Stations to edit',
},
creator = {
label = 'Creator',
station_name = 'Station Name',
station_price = 'Station Price',
price_per_l = 'Price per L',
restock_price = 'Restock price of fuel',
restock_price_description = 'Price that owner pays when ordering fuel',
start_balance = 'Start Balance',
sell_percentage = 'Percentage for selling business',
sell_percentage_description = 'How much will the owner receive from the original purchase price',
job_restricted = 'Restricted to specific job',
blip = 'Add blip',
},
creator_jobs = {
restricted_jobs = 'Restricted jobs',
label = 'How many jobs you want to add to this station?',
job_name = 'Job Name',
minimal_grade = 'Minimal grade that can access',
},
creator_blip = {
blip = 'Blip',
blip_name = 'Blip Name',
sprite = 'Sprite',
sprite_description = 'Range from 1-826',
colour = 'Colour',
colour_description = 'Range from 0-85',
},
pumps_creator = {
header = 'Creating pumps',
content = 'You will have to setup for each pump location and tank size',
},
pump_specifications = {
label = 'Pump Specifications',
tank_capacity = 'Capacity of tank (L)',
current_fuel = 'Current fuel inside tank',
},
delete_station = {
select_station = 'Select Gas Station',
},
update = {
select_action = 'Select Action',
update_general_data = 'Update general data',
update_fuel = 'Update fuel in pumps',
select_pumps = 'Select Pumps you want to edit',
},
buy_station ={
header = 'Buy Gas Station',
content = 'Would you like to buy %s for $%s',
labels = {
cancel = 'No',
confirm = 'Yes'
},
},
balance = 'Balance: $%s',
boss_actions = {
choose_action = 'Choose Action',
deposit = 'Deposit',
withdraw_input = 'How much you would like to withdraw',
withdraw = 'Withdraw',
deposit_input = 'How much you would like to deposit',
update_fuel_price = {
title = 'Selling Price: $%s/L \nRestock price: $%s/L',
fuel_price = 'Fuel Price',
new_price = 'New Price',
},
stash = {
title = 'Stash',
description = 'Open stash'
},
fuel_status = {
title = 'Fuel Status',
description = 'Check status of fuel in pumps',
restock = 'Restock',
restock_input = 'Restock fuel on %s',
label = 'How much would you like to restock?',
input_description = 'Max you can restock: %sL',
content = 'Would you like to buy %sL for $%s ?',
pump_status = 'Pump Status',
},
statistic = {
title = 'Statistic',
description = 'Check Gas Station statistics',
general_info = 'General Info',
general_info_header = 'General Info for %s',
general_info_content = 'Total Earnings: $%s \nTotal fuel sold: %s',
history = 'History',
history_title = 'On %s, %sL has been sold for $%s',
},
sell_gas_station = {
title = 'Sell Gas Station',
content = 'Would you like to sell this Gas Station for %s',
},
},
update_text = {
('ENTER - Finish \n'),
('Fueled: %s L \n'),
('Price: $%s \n'),
},
textui = {
fuel = 'Fuel',
buy_station = 'Buy Gas Station',
boss_menu = 'Boss Menu',
},
logs = {
station_created = 'Gas Station Created',
station_created_desc = '%s has created %s Gas Station',
station_purchased = 'Gas Station Purchased',
station_purchased_desc = '%s has bought %s for $%s',
fuel_purchased = 'Fuel Purchased',
fuel_purchased_desc = '%s has bought %sL of fuel for $%s',
fuel_restock = 'Fuel Restock',
fuel_restock_desc = '%s has bought %sL of fuel for %s, price $%s',
withdraw = 'Withdraw',
withdraw_desc = '%s has withdrawed $%s from %s',
deposit = 'Deposit',
deposit_desc = '%s has deposited $%s in %s',
station_sold = 'Station Sold',
station_sold_desc = '%s has sold %s for $%s',
station_deleted = 'Gas Station Deleted',
station_deleted_desc = '%s has deleted %s',
},
error_message = 'Something went wrong :/'
}
Last updated