Add GetResourceName function to all modules

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.
This commit is contained in:
MrNewb committed 2025-09-10 12:27:12 -04:00
1 parent cd16291038
commit 90c65dc55e
142 files changed
+784 -25

No files matched your search

@@ -30,4 +30,10 @@ RegisterNetEvent('community_bridge:Client:DispatchAlert', function(alert)
Bridge.Utility.RemoveBlip(blip)
end)
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'default'
end
return Dispatch
@@ -10,4 +10,10 @@ RegisterNetEvent("community_bridge:Server:DispatchAlert", function(data)
end
end)
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'default'
end
return Dispatch
@@ -16,4 +16,10 @@ Dispatch.SendAlert = function(data)
exports["bub-mdt"]:CustomAlert(alertData)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'bub-mdt'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('bub-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'bub-mdt'
end
return Dispatch
@@ -24,4 +24,10 @@ Dispatch.SendAlert = function(data)
})
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'cd_dispatch'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('cd_dispatch') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'cd_dispatch'
end
return Dispatch
@@ -27,4 +27,10 @@ Dispatch.SendAlert = function(data)
exports['kartik-mdt']:CustomAlert(alertOptions)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'kartik-mdt'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('kartik-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'kartik-mdt'
end
return Dispatch
@@ -40,4 +40,10 @@ Dispatch.SendAlert = function(data)
TriggerServerEvent("community_bridge:server:dispatch:sendAlert", alertData)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'lb-tablet'
end
return Dispatch
@@ -5,4 +5,10 @@ RegisterNetEvent("community_bridge:server:dispatch:sendAlert", function(data)
exports["lb-tablet"]:AddDispatch(data) -- this has a return value but we dont really have a use for it atm.
end)
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'lb-tablet'
end
return Dispatch
@@ -19,4 +19,10 @@ Dispatch.SendAlert = function(data)
})
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'linden_outlawalert'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('linden_outlawalert') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'linden_outlawalert'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('origen_police') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'origen_police'
end
return Dispatch
@@ -7,4 +7,10 @@ Dispatch.SendAlert = function(data)
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
@@ -36,4 +36,10 @@ RegisterNetEvent('community_bridge:Server:piotreq_gpt', function(data)
Dispatch.SendAlert(src, data)
end)
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'piotreq_gpt'
end
return Dispatch
@@ -27,4 +27,10 @@ Dispatch.SendAlert = function(data)
exports["ps-dispatch"]:CustomAlert(alertData)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'ps-dispatch'
end
return Dispatch
@@ -2,4 +2,10 @@ if GetResourceState('ps-dispatch') == 'missing' then return end
if GetResourceState('lb-tablet') == 'started' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'ps-dispatch'
end
return Dispatch
@@ -38,4 +38,11 @@ Dispatch.SendAlert = function(data)
end)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'qs-dispatch'
end
return Dispatch
@@ -1,4 +1,11 @@
if GetResourceState('qs-dispatch') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'qs-dispatch'
end
return Dispatch
@@ -14,4 +14,11 @@ Dispatch.SendAlert = function(data)
TriggerServerEvent("community_bridge:server:dispatch:sendAlert", alertData)
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'redutzu-mdt'
end
return Dispatch
@@ -11,4 +11,10 @@ RegisterNetEvent("community_bridge:server:dispatch:sendAlert", function(data)
})
end)
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'redutzu-mdt'
end
return Dispatch
@@ -20,4 +20,10 @@ Dispatch.SendAlert = function(data)
})
end
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'tk_dispatch'
end
return Dispatch
@@ -1,4 +1,10 @@
if GetResourceState('tk_dispatch') == 'missing' then return end
Dispatch = Dispatch or {}
---This will get the name of the in use resource.
---@return string
Dispatch.GetResourceName = function()
return 'tk_dispatch'
end
return Dispatch