cl_config.lua

Preview

```lua
function giveXP()

    -- example 1
    --exports.esx_xp:ESXP_Add(math.random(10,50))
    
end

function DrawText3D(x, y, z, text)
    local onScreen, _x, _y = World3dToScreen2d(x, y, z)
    local px, py, pz = table.unpack(GetGameplayCamCoord())
    local dist = GetDistanceBetweenCoords(px, py, pz, x, y, z, 1)

    local scale = ((1 / dist) * 2) * (1 / GetGameplayCamFov()) * 100

    if onScreen then
        SetTextColour(255, 255, 255, 255)
        SetTextScale(0.0 * scale, 0.35 * scale)
        SetTextFont(4)
        SetTextProportional(1)
        SetTextCentre(true)

        SetTextDropshadow(1, 1, 1, 1, 255)

        BeginTextCommandWidth("STRING")
        AddTextComponentString(text)
        local height = GetTextScaleHeight(0.55 * scale, 4)
        local width = EndTextCommandGetWidth(4)

        SetTextEntry("STRING")
        AddTextComponentString(text)
        EndTextCommandDisplayText(_x, _y)
    end
end

-- NOTIFICATION SYSTEM ---------------------------------------------------------------------------------------------------------------------------

function Notify(message) -- SELECT YOUR NOTIFICATION SYSTEM | 🟢 ESX ["ESX.ShowNotification(message)"] | 🔴 QB ["QBCore.Functions.Notify(message, 'success')"]

	--TriggerEvent('codem-notification:Create', message, 'info', nil, 5000)
	--exports['mythic_notify']:SendAlert('inform', message)
	ESX.ShowNotification(message)
	--exports['Roda_Notifications']:showNotify(message, 'info', 5000)
	--exports['okokNotify']:Alert("Zombies", message, 5000, 'info')
	--exports['mythic_notify']:SendAlert('inform', message)
	--QBCore.Functions.Notify(message, 'success')

end


function textUIOpen()
    lib.showTextUI() -- ox_lib
end
function textUIClose()
    lib.hideTextUI() -- ox_lib
end
```

Last updated

Was this helpful?