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
539 B
Lua
20 lines
539 B
Lua
Dispatch = Dispatch or {}
|
|
|
|
RegisterNetEvent("community_bridge:Server:DispatchAlert", function(data)
|
|
local jobs = data.jobs
|
|
for _, name in pairs(jobs) do
|
|
local activeJobPlayers = Bridge.Framework.GetPlayersByJob(name)
|
|
for _, src in pairs(activeJobPlayers) do
|
|
TriggerClientEvent('community_bridge:Client:DispatchAlert', src, data)
|
|
end
|
|
end
|
|
end)
|
|
|
|
---This will get the name of the in use resource.
|
|
---@return string
|
|
Dispatch.GetResourceName = function()
|
|
return 'default'
|
|
end
|
|
|
|
return Dispatch
|