From ab3cf826da3885ea2f41834f254850d88fb3030d Mon Sep 17 00:00:00 2001 From: Lucas <63737942+SSNRSS@users.noreply.github.com> Date: Wed, 15 Apr 2020 20:44:36 +0200 Subject: [PATCH] Implemented ShowFloatingHelpNotification() (#662) * Implement Floating Text use `ESX.ShowFloatingHelpNotification("lol")` in a loop * Removed beep and broken duration, fixed indent Co-authored-by: Lucas <63737942+SSNIKRS@users.noreply.github.com> Co-authored-by: ElPumpo --- client/functions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 7ac4387f..6cba9fe5 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -73,6 +73,14 @@ ESX.ShowHelpNotification = function(msg, thisFrame, beep, duration) end end +ESX.ShowFloatingHelpNotification = function(msg, coords) + AddTextEntry('esxFloatingHelpNotification', msg) + SetFloatingHelpTextWorldPosition(1, coords) + SetFloatingHelpTextStyle(1, 1, 2, -1, 3, 0) + BeginTextCommandDisplayHelp('esxFloatingHelpNotification') + EndTextCommandDisplayHelp(2, false, false, -1) +end + ESX.TriggerServerCallback = function(name, cb, ...) ESX.ServerCallbacks[ESX.CurrentRequestId] = cb