From 445ddc82ac3e4810c74092ce33d61af1863ee41a Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Wed, 14 May 2025 15:31:58 +0100 Subject: [PATCH] Change the "Stop Consuming" popup It was originally using `drawText` to use framework ui to display `[BACKSPACE] Stop Consuming` Changed to display an instructional native ui popup on the bottom right of the screen --- client/client.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/client/client.lua b/client/client.lua index 7a52358..647595d 100644 --- a/client/client.lua +++ b/client/client.lua @@ -218,18 +218,20 @@ RegisterNetEvent(getScript()..':Consume', function(itemName) end) while consuming do - local drawTable = debugMode and - { "[BackSpace] Stop Consuming", - "Time: "..tostring(time), - "Type: "..(type or ""), - "Hunger: "..(needStats.hunger or 0).."%", - "Thirst: "..(needStats.thirst or 0).."%", - "Stress: "..(stress or 0).."%", - "Heal: "..(heal or 0).."%", - "Armour: "..(armor or 0).."%", - } or - { "[BackSpace] Stop Consuming", } - drawText(nil, drawTable, nil, nil) + if debugMode then + drawText(nil, { + "Time: "..tostring(time), + "Type: "..(type or ""), + "Hunger: "..(needStats.hunger or 0).."%", + "Thirst: "..(needStats.thirst or 0).."%", + "Stress: "..(stress or 0).."%", + "Heal: "..(heal or 0).."%", + "Armour: "..(armor or 0).."%", + }, nil, nil) + end + makeInstructionalButtons({ + { keys = { 194 }, text = "Stop Consuming" }, + }) if time <= 0 then consuming = false end