Cache and entities update

added cache system similar to others that are readily available. Included beginings of reworked rebound entities
This commit is contained in:
gononono64 committed 2025-04-23 14:10:19 -05:00
1 parent b9842eedfe
commit 89858c6d73
16 files changed
+589 -207

No files matched your search

+2 -2
View File
@@ -125,7 +125,7 @@ end
---@param model string | number
---@return boolean
Utility.LoadModel = function(model)
if type(model) ~= 'number' then model = joaat(model) end
if type(model) ~= 'number' then model = GetHashKey(model) end -- Use GetHashKey instead of joaat for client
if not IsModelValid(model) and not IsModelInCdimage(model) then return false end
RequestModel(model)
local count = 0
@@ -301,7 +301,7 @@ end
---@param model string | number
---@return number
Utility.GetEntityHashFromModel = function(model)
if type(model) ~= 'number' then model = joaat(model) end
if type(model) ~= 'number' then model = GetHashKey(model) end -- Use GetHashKey instead of joaat for client
return model
end