_GET_POWER_SAVING_MODE_DURATION
Docslocal retval = GetPowerSavingModeDuration()Description
Returns duration of how long the game has been in power-saving mode (aka "constrained") in milliseconds.
Returns
intReturns an integer value.
local retval = GetPowerSavingModeDuration()Returns duration of how long the game has been in power-saving mode (aka "constrained") in milliseconds.
intReturns an integer value.
-- ox_lib DUI (Direct User Input) object wrapper
local dui = lib.dui:new({
url = "https://example.com",
width = 512,
height = 512,
debug = false,
})
-- Use as runtime texture:
print("Dict:", dui.dictName) -- for DrawSprite
print("Texture:", dui.txtName)
-- Update URL:
dui:setUrl("https://other-url.com")
-- Send message to DUI page:
dui:sendMessage({ action = "update", data = "hello" })
-- Mouse interaction:
dui:sendMouseMove(x, y)
dui:sendMouseDown("left")
dui:sendMouseUp("left")
-- Cleanup:
dui:remove()OOP wrapper for CreateDui + GetDuiHandle + CreateRuntimeTxd + CreateRuntimeTextureFromDuiHandle. Each DUI gets a unique texture dictionary and name. Supports URL changes, NUI messaging, and mouse input forwarding. remove() calls SetDuiUrl("about:blank") + DestroyDui.
No snippets yet. Be the first to contribute!