Introduces a standardized GetResourceName function to banking, clothing, dispatch, doorlock, framework, fuel, helptext, housing, and other modules. This function returns the name of the in-use resource, improving resource identification and interoperability across the codebase.
20 lines
504 B
Lua
20 lines
504 B
Lua
---@diagnostic disable: duplicate-set-field
|
|
if GetResourceState('qb-weathersync') == 'missing' then return end
|
|
Weather = Weather or {}
|
|
|
|
---This will toggle the players weather/time sync
|
|
---@param toggle boolean
|
|
---@return nil
|
|
Weather.ToggleSync = function(toggle)
|
|
if toggle then
|
|
TriggerEvent("qb-weathersync:client:EnableSync")
|
|
else
|
|
TriggerEvent("qb-weathersync:client:DisableSync")
|
|
end
|
|
end
|
|
|
|
Weather.GetResourceName = function()
|
|
return "qb-weathersync"
|
|
end
|
|
|
|
return Weather |