From 0c4f5f4bbcf7260eff35691e2246902f8806d669 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 23 May 2022 21:24:06 -0400 Subject: [PATCH] Text options Added different drawtext options in config --- client/cl_main.lua | 16 ++++++++++++++-- config.lua | 3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/client/cl_main.lua b/client/cl_main.lua index eb7558f..deff840 100644 --- a/client/cl_main.lua +++ b/client/cl_main.lua @@ -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) \ No newline at end of file diff --git a/config.lua b/config.lua index 6c709da..dfaad5a 100644 --- a/config.lua +++ b/config.lua @@ -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",