forked from Simnation/Main
137 lines
No EOL
5.9 KiB
Lua
137 lines
No EOL
5.9 KiB
Lua
Config = {}
|
|
|
|
Config.Framework = "standalone" -- types (standalone, qbcore, esx)
|
|
|
|
Config.ESXFramework = {
|
|
newversion = false, -- use this if you using new esx version (if you get error with old esxsharedobjectmethod in console)
|
|
getsharedobject = "esx:getSharedObject",
|
|
resourcename = "es_extended",
|
|
}
|
|
|
|
Config.QBCoreFrameworkResourceName = "qb-core" -- qb-core resource name, change this if you have different name of main resource of qbcore
|
|
|
|
Config.InterfaceColor = "#ff66ff" -- change interface color, color must be in hex
|
|
|
|
Config.Language = "English" -- text language from code, if you want translate interface, you need do it manually in html folder.
|
|
|
|
Config.LiftControlDistance = 4.0 -- lift control distance
|
|
|
|
Config.LiftOpenKey = "E" -- lift open key
|
|
|
|
Config.InteractionSystem = 1 -- 1 == Our custom interact system, 2 == 3D Text Interact, 3 == Gta V Online Interaction Style
|
|
|
|
Config.Target = false -- enable this if you want use target
|
|
|
|
Config.Targettype = "qtarget" -- types - qtarget, qbtarget, oxtarget
|
|
|
|
Config.TargetSystemsNames = {qtarget = "qtarget", qbtarget = "qb-target", oxtarget = "ox_target"}
|
|
|
|
Config.TargetIcon = "fas fa-box-circle-check"
|
|
|
|
Config.CarLiftCreator = false -- enable this only on dev server, you can open car lift creator via /carliftcreator command (https://www.youtube.com/watch?v=0KHiz_MKl2g)
|
|
|
|
Config.CustomJobEvent = false -- enable this if you want use custom job event for detect if player have a job (for lifts which have enabled onlyjoballowed function)
|
|
|
|
Config.CustomJobEventName = "rtx_carlift:SetJob" -- you can execute this event for set player job in car lift script (its clientside event) for example TriggerEvent("rtx_carlift:SetJob", "mechanic") (after that, script will know that player have job mechanic)
|
|
|
|
-- You can detect if vehicle is on lift via our function IsVehicleOnLift example: local vehicleonlift, liftheight = exports["rtx_carlift"]:IsVehicleOnLift(vehicle) (vehicleonlift return false or true, liftheight return height on which lift currently is)
|
|
|
|
-- for add new lift you need just copy line from 29 to 42 and paste it at under line 42
|
|
|
|
Config.Lifts = {
|
|
{
|
|
coords = vector3(-3074.68, 447.43, 6.97), -- lift coords
|
|
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
|
|
currentheight = 0.0, -- dont edit this
|
|
objecthandler = {frame = nil, lift = nil}, -- dont edit this
|
|
manipulating = false, -- dont edit this
|
|
manipulatingplayerid = nil, -- dont edit this
|
|
lifttype = 2, -- lift type 1-4
|
|
buttonuppress = false, -- dont edit this
|
|
buttondownpress = false, -- dont edit this
|
|
onlyjoballowed = false, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
|
|
jobs = {
|
|
},
|
|
},
|
|
{
|
|
coords = vector3(0.0, 0.0, 0.0), -- lift coords
|
|
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
|
|
currentheight = 0.0, -- dont edit this
|
|
objecthandler = {frame = nil, lift = nil}, -- dont edit this
|
|
manipulating = false, -- dont edit this
|
|
manipulatingplayerid = nil, -- dont edit this
|
|
lifttype = 2, -- lift type 1-4
|
|
buttonuppress = false, -- dont edit this
|
|
buttondownpress = false, -- dont edit this
|
|
onlyjoballowed = false, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
|
|
jobs = {
|
|
},
|
|
},
|
|
{
|
|
coords = vector3(0.0, 0.0, 0.0), -- lift coords
|
|
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
|
|
currentheight = 0.0, -- dont edit this
|
|
objecthandler = {frame = nil, lift = nil}, -- dont edit this
|
|
manipulating = false, -- dont edit this
|
|
manipulatingplayerid = nil, -- dont edit this
|
|
lifttype = 2, -- lift type 1-4
|
|
buttonuppress = false, -- dont edit this
|
|
buttondownpress = false, -- dont edit this
|
|
onlyjoballowed = false, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
|
|
jobs = {
|
|
},
|
|
},
|
|
{
|
|
coords = vector3(0.0, 0.0, 0.0), -- lift coords
|
|
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
|
|
currentheight = 0.0, -- dont edit this
|
|
objecthandler = {frame = nil, lift = nil}, -- dont edit this
|
|
manipulating = false, -- dont edit this
|
|
manipulatingplayerid = nil, -- dont edit this
|
|
lifttype = 2, -- lift type 1-4
|
|
buttonuppress = false, -- dont edit this
|
|
buttondownpress = false, -- dont edit this
|
|
onlyjoballowed = false, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
|
|
jobs = {
|
|
},
|
|
},
|
|
--[[ -- Other example for new lifts (this is example for lift with job allow only
|
|
{
|
|
coords = vector3(-60.84, -165.34, -99.63), -- lift coords
|
|
rotation = vector3(0.0, 0.0, 90.0),-- lift rotation
|
|
currentheight = 0.0, -- dont edit this
|
|
objecthandler = {frame = nil, lift = nil}, -- dont edit this
|
|
manipulating = false, -- dont edit this
|
|
manipulatingplayerid = nil, -- dont edit this
|
|
lifttype = 4, -- lift type 1-4
|
|
buttonuppress = false, -- dont edit this
|
|
buttondownpress = false, -- dont edit this
|
|
onlyjoballowed = true, -- enable this if you want lift restricted only for some jobs (works for only for qbcore and esx)
|
|
jobs = {
|
|
["mechanic"] = true,
|
|
["police"] = true,
|
|
},
|
|
},-]]
|
|
}
|
|
|
|
function Notify(text)
|
|
exports["rtx_notify"]:Notify("Lift", text, 5000, "info") -- if you get error in this line its because you dont use our notify system buy it here https://rtx.tebex.io/package/5402098 or you can use some other notify system just replace this notify line with your notify system
|
|
--exports["mythic_notify"]:SendAlert("inform", text, 5000)
|
|
end
|
|
|
|
function DrawText3D(x, y, z, text)
|
|
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
|
|
local px,py,pz=table.unpack(GetGameplayCamCoords())
|
|
if onScreen then
|
|
SetTextScale(0.35, 0.35)
|
|
SetTextFont(4)
|
|
SetTextProportional(1)
|
|
SetTextColour(255, 255, 255, 255)
|
|
SetTextEntry("STRING")
|
|
SetTextCentre(1)
|
|
AddTextComponentString(text)
|
|
DrawText(_x,_y)
|
|
local factor = (string.len(text)) / 240
|
|
DrawRect(_x, _y + 0.0125, 0.015 + factor, 0.03, 255, 102, 255, 150)
|
|
end
|
|
end |