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:
1 parent
cd16291038
commit
90c65dc55e
142 files changed
+784
-25
No files matched your search
@@ -1,3 +1,9 @@
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "default"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -11,4 +11,10 @@ RegisterNetEvent('community_bridge:Server:_OnPlayerInside', function(src, inside
|
||||
TriggerEvent('community_bridge:Client:OnPlayerInside', src, insideId, currentBucket, playerCoords)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "default"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -10,4 +10,10 @@ RegisterNetEvent("Housing:client:DeleteFurnitures", function()
|
||||
TriggerServerEvent('community_bridge:Server:_OnPlayerInside', false)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "bcs-housing"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -2,4 +2,10 @@ if GetResourceState('bcs-housing') == 'missing' then return end
|
||||
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "bcs-housing"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -2,4 +2,10 @@ if GetResourceState('esx_property') == 'missing' then return end
|
||||
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "esx_property"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -12,4 +12,10 @@ RegisterNetEvent('esx_property:leave', function(insideId)
|
||||
TriggerEvent('community_bridge:Server:_OnPlayerInside', src, insideId)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "esx_property"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -2,4 +2,10 @@ if GetResourceState('ps-housing') == 'missing' then return end
|
||||
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "ps-housing"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -12,4 +12,10 @@ RegisterNetEvent('ps-housing:server:leaveProperty', function(insideId)
|
||||
TriggerEvent('community_bridge:Server:_OnPlayerInside', src, insideId)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "ps-housing"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -2,4 +2,10 @@ if GetResourceState('qb-appartments') == 'missing' then return end
|
||||
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "qb-appartments"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -8,4 +8,11 @@ RegisterNetEvent('qb-apartments:server:SetInsideMeta', function(house, insideId,
|
||||
TriggerEvent('community_bridge:Server:_OnPlayerInside', src, insideId)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "qb-appartments"
|
||||
end
|
||||
|
||||
|
||||
return Housing
|
||||
@@ -2,4 +2,10 @@ if GetResourceState('qb-houses') == 'missing' then return end
|
||||
|
||||
Housing = Housing or {}
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "qb-houses"
|
||||
end
|
||||
|
||||
return Housing
|
||||
@@ -8,4 +8,10 @@ RegisterNetEvent('qb-houses:server:SetInsideMeta', function(insideId, bool)
|
||||
TriggerEvent('community_bridge:Server:_OnPlayerInside', src, insideId)
|
||||
end)
|
||||
|
||||
---This will get the name of the in use resource.
|
||||
---@return string
|
||||
Housing.GetResourceName = function()
|
||||
return "qb-houses"
|
||||
end
|
||||
|
||||
return Housing
|
||||
Reference in new issue
Block a user