fix: drawtext and fxmanifest

This commit is contained in:
unknown
2023-11-09 00:49:02 -08:00
parent 5b5ba9e1af
commit 26ed7c917d
2 changed files with 21 additions and 4 deletions
+15 -1
View File
@@ -55,6 +55,20 @@ local function takeOffSuit()
ClearPedTasks(cache.ped) ClearPedTasks(cache.ped)
end end
local function DrawText(text)
ClearPedTasks(cache.ped)
SetTextFont(4)
SetTextProportional(true)
SetTextScale(0.0, 0.45)
SetTextDropshadow(1, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
BeginTextCommandDisplayText("STRING")
AddTextComponentSubstringPlayerName(text)
EndTextCommandDisplayText(0.45, 0.90)
end
local function putOnSuit() local function putOnSuit()
if oxygenLevel <= 0 then if oxygenLevel <= 0 then
exports.qbx_core:Notify(Lang:t("error.need_otube"), 'error') exports.qbx_core:Notify(Lang:t("error.need_otube"), 'error')
@@ -111,7 +125,7 @@ local function putOnSuit()
CreateThread(function() CreateThread(function()
while currentGear.enabled do while currentGear.enabled do
if IsPedSwimmingUnderWater(cache.ped) then if IsPedSwimmingUnderWater(cache.ped) then
DrawText2D(oxygenLevel..'', vec2(0.45, 0.90), 1.0, 1.0, 0.45) DrawText(oxygenLevel..'')
end end
Wait(0) Wait(0)
end end
+6 -3
View File
@@ -4,13 +4,16 @@ game 'gta5'
description 'items to help players breathe and move underwater' description 'items to help players breathe and move underwater'
version '0.0.0' version '0.0.0'
shared_script { shared_scripts {
'@ox_lib/init.lua', '@ox_lib/init.lua',
'@qb-core/shared/locale.lua', '@qbx_core/import.lua',
'@qbx_core/shared/locale.lua',
'locales/en.lua', 'locales/en.lua',
'locales/*.lua', 'locales/*.lua',
'config.lua', 'config.lua',
'@qbx_core/import.lua', }
modules {
'qbx_core:utils', 'qbx_core:utils',
} }