- init changes

This commit is contained in:
Mustachedom committed 2026-08-17 03:49:37 -07:00
1 parent 8accf38f97
commit d6cffd01bc
38 files changed
+325 -3377

No files matched your search

+3 -2
View File
@@ -129,7 +129,7 @@ end
--- @param entityData EntityData
--- @return table Registered point/entity entry (the value stored in ClientEntity.All[entityData.id]).
function ClientEntity.Create(entityData)
entityData.id = entityData.id or Ids.CreateUniqueId(ClientEntity.All)
entityData.id = entityData.id or lib.string.random('Aa1A', 8) -- Generate a random ID if not provided
if ClientEntity.All[entityData.id] then return ClientEntity.All[entityData.id] end
entityData.rotation = entityData.rotation or vector3(0.0, 0.0, entityData.heading or 0.0)
entityData.invoked = entityData.invoked or GetInvokingResource() or "community_bridge"
@@ -236,7 +236,8 @@ function ClientEntity.SetAnim(id, anim)
local entity = entityData.spawned
if not entity or not DoesEntityExist(entity) then return end
if not anim then return Bridge.Anim.Stop(id) end
Bridge.Anim.Play(id, entity, anim.dict, anim.name, anim.blendIn or 8.0, anim.blendOut or -8.0, anim.duration, anim.flags, anim.playbackRate or 0.0, anim.onComplete)
lib.playAnim(entity, anim.dict, anim.name, anim.blendIn or 8.0, anim.blendOut or -8.0, anim.duration, anim.flags, anim.playbackRate or 0.0)
end
--- Attaches the spawned FiveM entity for a ClientEntity to a target, or detaches when nil.