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.
16 lines
427 B
Lua
16 lines
427 B
Lua
---@diagnostic disable: duplicate-set-field
|
|
if GetResourceState('piotreq_gpt') == 'missing' then return end
|
|
Dispatch = Dispatch or {}
|
|
|
|
Dispatch.SendAlert = function(data)
|
|
if not data then return end
|
|
TriggerServerEvent('community_bridge:Server:piotreq_gpt', data)
|
|
end
|
|
|
|
---This will get the name of the in use resource.
|
|
---@return string
|
|
Dispatch.GetResourceName = function()
|
|
return 'piotreq_gpt'
|
|
end
|
|
|
|
return Dispatch |