Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions client/cl_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,24 @@ CreateThread(function()

if inZone and not alreadyEnteredZone then
alreadyEnteredZone = true
TriggerEvent('cd_drawtextui:ShowUI', 'show', text)
if Config.Interaction == "qb" then
exports['qb-core']:DrawText(text, "left")
elseif Config.Interaction == "cd" then
TriggerEvent('cd_drawtextui:ShowUI', 'show', text)
else
exports['qb-drawtext']:DrawText(text, "left")
end
end

if not inZone and alreadyEnteredZone then
alreadyEnteredZone = false
TriggerEvent('cd_drawtextui:HideUI')
if Config.Interaction == "qb" then
exports['qb-core']:HideText()
elseif Config.Interaction == "cd" then
TriggerEvent('cd_drawtextui:HideUI')
else
exports['qb-drawtext']:HideText()
end
end
end
end)
3 changes: 3 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Config = Config or {}

Config.Interaction = "qb" -- qb = qb-core drawtext / cd = cd drawtext / draw = qb-drawtext

Config.Ped = {
{
type = "fivem-appearance",
Expand Down