Config Client
local Framework
local player
if GetResourceState('es_extended') == 'started' then
Framework = exports['es_extended']:getSharedObject()
elseif GetResourceState('qb-core') == 'started' then
Framework = exports['qb-core']:GetCoreObject()
end
function FrameworkNotification(text, type)
if Config.CustomNotify == true then
-- Put here your code
else
if GetResourceState('ox_lib') == 'started' then
lib.notify({ title = "Revel - VehicleShop", position = "center-left", description = text, type = type })
elseif GetResourceState('qb-core') == 'started' then
Framework.Functions.Notify(text, type)
end
end
end
function FrameworkTextUI(text)
if Config.CustomTextUI then
-- Put here your code
else
if GetResourceState('ox_lib') == 'started' then
lib.showTextUI(text, {position = "left-center", icon = 'card'})
elseif GetResourceState('qb-core') == 'started' then
exports['qb-core']:DrawText(text, 'left')
end
end
end
function FrameworkHideTextUI()
if Config.CustomTextUI then
-- Put here your code
if GetResourceState('ox_lib') == 'started' then
lib.hideTextUI()
elseif GetResourceState('qb-core') == 'started' then
exports['qb-core']:HideText()
end
end
end
function FrameworkGetJob()
if Config.CustomNotify == true then
-- Put here your code
else
if GetResourceState('es_extended') == 'started' then
player = Framework.GetPlayerData()
return player.job.name
elseif GetResourceState('qb-core') == 'started' then
player = Framework.Functions.GetPlayerData()
return player.job.name
end
end
end
function FrameworkGetVehicleProperties(vehicle)
if GetResourceState('es_extended') == 'started' then
return Framework.Game.GetVehicleProperties(vehicle)
elseif GetResourceState('qb-core') == 'started' then
return Framework.Functions.GetVehicleProperties(vehicle)
elseif Config.Framework == "OTHER" then
-- Put here your code
end
end
function WhenVehicleSpawn(vehicle)
-- If you want to add like keys or other extras when the vehicle is delivered to the player...
end
function DrawText3D(x, y, z, text)
local onScreen, _x, _y = World3dToScreen2d(x, y, z)
local px, py, pz = table.unpack(GetGameplayCamCoords())
SetTextScale(0.32, 0.32)
SetTextFont(6)
SetTextProportional(1)
SetTextColour(255, 255, 255, 255)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x, _y)
local factor = (string.len(text)) / 550
DrawRect(_x, _y + 0.0125, 0.015 + factor, 0.03, 0, 0, 0, 80)
end
Last updated