forked from Simnation/Main
103 lines
No EOL
3.1 KiB
Lua
103 lines
No EOL
3.1 KiB
Lua
Config = {}
|
|
|
|
Config.useESX = false
|
|
Config.useQBCore = true
|
|
|
|
Config.AutoFindPhoneBoxes = true -- If true, it will find all phoneboxes in the map
|
|
|
|
Config.AutoFindPhoneBoxesModels = {
|
|
'p_phonebox_01b_s',
|
|
'p_phonebox_02_s',
|
|
'prop_phonebox_01a',
|
|
'prop_phonebox_01b',
|
|
'prop_phonebox_01c',
|
|
'prop_phonebox_02',
|
|
'prop_phonebox_03',
|
|
'prop_phonebox_04',
|
|
'sf_prop_sf_phonebox_01b_s'
|
|
}
|
|
|
|
Config.PhoneBoxes = { --Works only if AutoFindPhoneBoxes is false!
|
|
['555889280'] = { name = "PhoneBox1", coords = vector4(-541.4696, -268.5553, 34.0, 20.0) }
|
|
}
|
|
|
|
Config.PhoneBoxModel = "sf_prop_sf_phonebox_01b_s" --Model for Config.PhoneBoxes
|
|
|
|
Config.UseTarget = true -- If true, it will use the target system to interact with the phonebox / only works with AutoFindPhoneBoxes = true
|
|
Config.TargetSystem = "qb-target" -- The target system you are using ( qb-target or ox_target )
|
|
|
|
Config.ESXTextUI = true -- If true, it will use esx_textui to display notifys.
|
|
Config.UseESXContext = true -- If true, it will use the ESX Context to enter phone_number
|
|
|
|
|
|
Config.ChargePrice = true -- If true, it will charge the player for using the phonebox
|
|
Config.ChargePriceEvery = 3 -- The amount of time in seconds it will charge the player for using the phonebox
|
|
Config.ChargePriceAmount = 2 -- The amount of money it will charge the player for using the phonebox
|
|
|
|
Config.Distance = 2.0 --Distance to the phonebox to access them
|
|
Config.DisableIdleCam = true -- If true, it will disable the idle cam when using the phonebox
|
|
|
|
|
|
Config.Locales = {
|
|
|
|
Title = "PhoneBox",
|
|
Phone_number = "Phone Number",
|
|
Numberisnull = "Number is null",
|
|
pressE = "Drücke [E] um die Telefonzelle zu nutzen",
|
|
endCall = "Drücke ~INPUT_FRONTEND_RRIGHT~ um aufzulegen",
|
|
notEnoughMoney = "Besorg dir Geld!",
|
|
BankTransactionsName = "Telefonzelle",
|
|
Price = "$",
|
|
Timer = "Zeit: ",
|
|
PriceText = "Preis: ",
|
|
|
|
}
|
|
|
|
Config.Notify = function(source, text)
|
|
if Config.useESX then
|
|
TriggerClientEvent('esx:showNotification', source, text)
|
|
else
|
|
TriggerClientEvent('QBCore:Notify', source, text)
|
|
end
|
|
|
|
end
|
|
|
|
if Config.useESX then
|
|
|
|
ESX = exports['es_extended']:getSharedObject()
|
|
|
|
-- Run the code below if ESX nil is displayed in your console and delete the code above--.
|
|
|
|
-- ESX = nil
|
|
-- TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
|
|
|
|
|
elseif Config.useQBCore then
|
|
|
|
Config.NewQBVersion = true
|
|
|
|
if Config.NewQBVersion then
|
|
QBCore = exports['qb-core']:GetCoreObject()
|
|
else
|
|
TriggerEvent("QBCore:GetObject", function(obj)
|
|
QBCore = obj
|
|
end)
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function ShowHelpNotification(msg, thisFrame, beep, duration)
|
|
AddTextEntry('HelpNotification', msg)
|
|
|
|
if thisFrame then
|
|
DisplayHelpTextThisFrame('HelpNotification', false)
|
|
else
|
|
if beep == nil then
|
|
beep = true
|
|
end
|
|
BeginTextCommandDisplayHelp('HelpNotification')
|
|
EndTextCommandDisplayHelp(0, false, false, duration or -1)
|
|
end
|
|
end |