Skip to content

Instantly share code, notes, and snippets.

@wowjeeez
Last active May 29, 2021 13:51
Show Gist options
  • Save wowjeeez/b30560b9faefef9a28921e36d8489a69 to your computer and use it in GitHub Desktop.
Save wowjeeez/b30560b9faefef9a28921e36d8489a69 to your computer and use it in GitHub Desktop.
NUI focus toggler
local toggled = false
function notify(string)
SetNotificationTextEntry("STRING")
AddTextComponentString(string)
DrawNotification(true, false)
end
RegisterCommand("focus", function(_, args)
local curr = args[1] == "1" and true or false
toggled = curr
SetNuiFocus(toggled, toggled)
if toggled then
notify("~g~Nui focus ON")
else
notify("~r~Nui focus OFF")
end
end, false)
fx_version "cerulean"
author "wowjeez"
game "gta5"
client_script "client.lua"
ui_page "index.html"
<html>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment