40 Commits
Author SHA1 Message Date
Mustachedom 3947eb6cd5 - gutted utilities to only have a couple useful functions
- `removed` second object spawner
- `edit` more lib conversions
2026-08-18 01:23:06 -07:00
Mustachedom d85a1300d5 - remove callback calls 2026-08-18 00:13:37 -07:00
Mustachedom d6cffd01bc - init changes 2026-08-17 03:49:37 -07:00
Mr.Crowley 1f2519af5b took pr suggestions
removed print and added missed documentation
also missed passing id for anim, id is based off entitydata id
2026-01-12 16:42:44 -06:00
Mr.Crowley 4bc1925f4d Add UpdateRotation method to ClientEntity
Introduces ClientEntity.UpdateRotation to update entity rotation and apply it to the spawned entity if it exists. Also fixes SetKey to update the key before calling the handler.
2026-01-11 20:37:42 -06:00
Mr.Crowley 68ca928033 Stipped away inefficient behavior system
Refactored the entity system to be **property-driven** with automatic `On<Property>` change handlers.

Added improved `Bridge.Entity.SetOnCreate` support so clients can identify and attach logic to **server-created entities** based on properties.

Introduced standardized default properties on `Bridge.Entity.Create`, including:

* `freeze` (defaults to frozen)
* `invincible`
* `targets`
* `attach`
* `anim`

Added exported helper functions for all of the above to allow runtime updates after creation.
2026-01-11 18:36:07 -06:00
MrNewb 444040dd39 This was crowleys commit and work - Refactor entity behaviors and improve particle handling
Refactored entity behavior triggers to simplify argument passing and added OnSet handler for particle behaviors. Improved particle effect management and event handling, updated locale and lib initialization in several modules, and fixed skill metadata access. Also streamlined point zone logic and menu/zone system initialization for better reliability.
2025-10-26 16:20:27 -04:00
Mr.Crowley c985261cf3 Fix SetEntityCoords last arg to false in UpdateEntity
Changed the last argument of SetEntityCoords from true to false in the UpdateEntity function to adjust entity movement behavior.
2025-09-18 23:47:03 -05:00
MrNewb d669f7ba16 Remove debug print from UpdateEntity event
Eliminated unnecessary json-encoded print statement from the UpdateEntity event handler to clean up console output.
2025-09-10 12:42:19 -04:00
Mr.Crowley 18748bd775 Refactor entity movement and add Math.Nearest function
Simplifies entity movement logic in client_entity.lua by improving coordinate comparison and updating behavior triggers. Adds a new Math.Nearest function in math.lua to round values to the nearest whole number.
2025-09-04 11:42:59 -05:00
Mr.Crowley 7443695254 Improve entity spawning and target behaviors
Refactored client entity spawning to handle missing models and improved coordinate update sensitivity. Removed model assertion from server entity creation. Enhanced resource start event handling for both server and client. Updated stash and target behaviors to support additional properties and better zone handling for entities without spawned objects.
2025-09-03 08:57:39 -05:00
Mr.Crowley cb9dbdf610 Adjust entity movement threshold and follow behavior
Increased the movement threshold for entity updates from 0.05 to 1.0 to reduce unnecessary position updates. Modified follow behavior to offset the entity's coordinates by -1 on the Z axis when updating, possibly to account for ground level or animation adjustments.
2025-09-03 01:23:01 -05:00
Mr.Crowley dd08f058c3 Refactor client entity management functions
Added freeze position handling in UpdateEntity and ensured OnDestroy behavior is triggered on entity destruction. Removed unused and commented-out Update function, and improved code clarity in Set and Destroy methods.
2025-09-03 01:04:04 -05:00
Mr.Crowley 8346130b00 Add modular entity behaviors and update entity logic
Introduces modular behaviors for entities, including anim, attach, clothing, follow, particles, scenarios, shop, stash, targets, and weapon, each in their own files. Updates client_entity.lua and behaviors.lua to support dynamic behavior registration, initialization, and triggering. Refactors entity update logic to improve movement handling and behavior invocation.
2025-09-03 00:28:17 -05:00
Mr.Crowley c399fbaca4 Refactor behavior and entity invocation handling
Standardizes the use of the 'invoked' property for entities and behaviors, ensuring behaviors are scoped per invoking resource. Updates behavior registration, retrieval, removal, and cleanup logic to support resource-specific behavior tables, improving modularity and preventing cross-resource conflicts.
2025-08-31 20:50:46 -05:00
Mr.Crowley f2ff03734e prep for behaviors
readded behaviors
2025-08-30 19:12:56 -05:00
Mr.Crowley 495b24e53f fixed last mess 2025-08-27 06:13:02 -05:00
Mr.Crowley e06e04a2c6 hope this works 2025-08-27 05:47:44 -05:00
Mr.Crowley 5b6641fc60 silly me
woopsies
2025-08-24 20:02:47 -05:00
Mr.Crowley 8c309e248e Added behaviors and documentation to oxlibs zones
Will provide file in example when more features are implimented
2025-08-23 22:53:49 -05:00
Mr.Crowley b06d2fb49e Discarded entityactions and updated target
Discarded entityactions: was not used and bloat. Need a new system that handled networked entities static vs dynamic (non-moving non networked vs moving networked)

updated target to improve performance on canInteract. It seems that the target systems spam this function. Using a state and checking every second instead of allowing spamming

Added ClientEntity.ChangeModel
2025-08-20 22:23:07 -05:00
Mr.Crowley 7a598dd8d8 update for fivem appearance
should be working for esx now
2025-08-15 13:28:13 -05:00
Mr.Crowley e11ef1242d tweaks 2025-08-12 19:23:15 -05:00
MrNewb 29c19f3cb4 Update client_entity.lua 2025-08-12 20:20:49 -04:00
Mr.Crowley 140bad5b34 made woopsie to entities 2025-08-05 20:57:26 -05:00
Mr.Crowley 2fd5c7c08f Update client_entity.lua
Added skip to remove so we dont call external on remove.
2025-07-28 00:58:02 -05:00
Mr.Crowley 0970bdd604 migrated management to banking
also fixed loadmodel typo
2025-07-25 02:51:14 -05:00
Mr.Crowley 2ad1f4669c small update
target got a print if onSelect or action are nil

also added groups in fixoptions for sleepless

client entities using return for loadmodel
2025-07-24 05:03:07 -05:00
gononono64 003153be63 entity adjustments
depricating register / unregister and replacing with Create/Destroy to follow convention
math.Inbounds checks a list of points (table.points = vector3[] minZ = int || -math.huge, maxZ = int || math.huge)
2025-06-30 15:18:01 -05:00
gononono64 9b44fcbc16 small tweaks
entities now has register bulk
added docs to a function for sql module
added table.count
2025-06-22 17:40:41 -05:00
gononono64 3fa933fab1 Cleanup and placeable_object replacement
Added cleaned up and improved functionality for placeable object.
Example is in unit tests.

Cleanup whitespace and removed accessibility as not used/not documented and doesnt appear to be useful with our current work flow
2025-06-04 15:29:21 -05:00
gononono64 34d24cb6a9 Targets, entities and events, oh my!
Targets updated to have boxzone
Entities dont require a model and are effectively points with on spawn on despawn
onplayerloaded and onplayeriunloaded now pass source
2025-06-02 22:19:42 -05:00
gononono64 b9f5a3ed64 Small fix for client entities and qb stashes and shops
Shops: aligned format with others and removed the instant open (on create)

Stashes: Updated for new version of qb (exports)

Entities: returning point object
2025-05-24 15:36:05 -05:00
gononono64 0d606bc859 Entity fix and stash update
Slimed OpenStash down to just an src and id instead of needing duplicate data.

Was not sure if this affects newb so im throwing it in a pr.
2025-05-19 07:20:23 -05:00
gononono64 7927927394 lil more cleanup
i love prints!
2025-05-12 02:48:11 -05:00
gononono64 498f8670ee Bazinga Scenes
I bring you bazinga scenes. These are regular cutscenes but here now. Okay good bye
2025-05-11 00:47:33 -05:00
gononono64 38d0d5527a New features and cleanup
Added Networked Markers
Added Anim module
Added framework default file for things that are native to game related to player
Started on a batch network event trigger to allow for single event call for multiple events

Updated params notation for ids
Removed prints from client_entity + actions + ext
2025-05-09 19:06:50 -05:00
gononono64 4d8b2ff203 Rebound entity stuff
added function to get a local offset world position from a point
updated entities to automatically process next queued action without needing to call processnextaction
Added client freeze, circle, and bobupanddown for client/rebound entity manipulation
2025-05-04 11:11:29 -05:00
gononono64 c23df31199 Server and client entity update
syncing non networked entities to all players in range
allow for firing functions when entering or exiting the range of the entity
2025-04-28 22:51:54 -05:00
gononono64 89858c6d73 Cache and entities update
added cache system similar to others that are readily available. Included beginings of reworked rebound entities
2025-04-23 14:10:19 -05:00