βοΈframework bridge
Overview
Client-Side (ESX)
ESX = exports['es_extended']:getSharedObject()
Menu = {}
Interaction = {}
Notify = {}
Utils = {}
Utils.RequestModel = function(model, timeout)
return lib.requestModel(model, timeout or 5000)
end
Utils.Callback = function(event, delay, cb, ...)
lib.callback(event, delay or false, cb, ...)
end
Utils.CreateZone = function(data)
return lib.zones.box(data)
end
Utils.CreateDUI = function(data)
return lib.dui:new(data)
end
Utils.CreateBlip = function(data)
local blip = AddBlipForCoord(data.coords.x, data.coords.y, data.coords.z)
if data.sprite then SetBlipSprite(blip, data.sprite) end
SetBlipDisplay(blip, 2)
if data.scale then SetBlipScale(blip, data.scale) end
if data.colour then SetBlipColour(blip, data.colour) end
SetBlipAsShortRange(blip, true)
if data.name then
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(data.name)
EndTextCommandSetBlipName(blip)
end
return blip
end
Notify.Success = function(title, description, duration)
lib.notify({ title = title, description = description, type = 'success', duration = duration or 3000 })
end
Notify.Error = function(title, description, duration)
lib.notify({ title = title, description = description, type = 'error', duration = duration or 3000 })
end
Notify.Info = function(title, description, duration)
lib.notify({ title = title, description = description, type = 'info', duration = duration or 3000 })
end
Interaction.Target = function(coords, name, rotation, distance, debug, size, options)
exports.ox_target:addBoxZone({
coords = coords, size = size, name = name, rotation = rotation, debug = debug, distance = distance or 2.5, options = options
})
end
Interaction.TargetObject = function(models, options)
exports.ox_target:addModel(models, options)
end
Interaction.EntityTarget = function(entity, options)
exports.ox_target:addLocalEntity(entity, options)
end
Interaction.RemoveTarget = function(name)
exports.ox_target:removeZone(name)
end
Interaction.RemoveTargetObject = function(models)
exports.ox_target:removeModel(models)
end
Utils.AddCarKey = function(plate, model, vehicleData)
print(('[sl-cardealer] AddCarKey called - Plate: %s, Model: %s'):format(plate or 'N/A', model or 'N/A'))
end
Utils.RemoveCarKey = function(plate, model, vehicleData)
print(('[sl-cardealer] RemoveCarKey called - Plate: %s, Model: %s'):format(plate or 'N/A', model or 'N/A'))
endServer-Side (ESX)
Car Key Integration
Available Key Systems
Function Reference
Client Functions
Function
Parameters
Description
Server Functions
Function
Parameters
Returns
Description