hope this works

This commit is contained in:
Mr.Crowley committed 2025-08-27 05:47:44 -05:00
1 parent 5b6641fc60
commit e06e04a2c6
6 files changed
+138 -102

No files matched your search

+13
View File
@@ -117,6 +117,19 @@ function ServerEntity.Remove(id)
Entities[id] = nil
end
--- Updates data for a server-side entity and notifies clients.
-- @param id string|number The ID of the entity to update.
-- @param data table The data fields to update.
function ServerEntity.Set(id, data)
local entity = Entities[id]
if not entity then return false end
for key, value in pairs(data) do
entity[key] = value
end
TriggerClientEvent("community_bridge:client:UpdateEntity", -1, id, data)
return true
end
-- Clean up entities associated with a stopped resource
AddEventHandler('onResourceStop', function(resourceName)
local toDelete = {}