59 Commits
Author SHA1 Message Date
Mr.Crowley 30391507bf Merge branch 'main' of https://github.com/gononono64/community_bridge 2026-08-14 17:41:30 -05:00
Mr.Crowley ad8788bbfd Invoking can return nil
Added fallback for current resource, future proofing against require and fixing entities target property
2026-08-14 17:38:09 -05:00
Mr.Crowley 0088559b91 qb also returns strings for some reason
qb returns "true" or "false" instead of true or false for checkbox's and probably other stuff. Converting to bools to be consistent with ox's returns
2026-02-24 01:14:50 -06:00
Mr.Crowley b90463b7d2 issue with qb-input checkboxes
qb-input was not returning multiple checkboxes correctly.

The issue was that the returned data was being overwritten by other return values.

example:
```lua
local input = {
    {
        type = 'input',
        label = Locale("whitelist.label"),
        description = Locale("whitelist.description"),
        required = true,
    },
    {
        type = 'checkbox',
        label = Locale("can_whitelist.label"),
        required = false,
    },
    {
        type = 'checkbox',
        label = Locale("whitelist_temp_access.label"),
        required = false,
    }
}
```

Previously, one of the checkbox values would get overridden. The same issue occurred when using .options.
2026-02-24 00:53:37 -06: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
Mr.Crowley c40a260ea2 magic space was introduced with last patch
removed
2025-11-14 19:34:47 -06:00
Mr.Crowley a1901fc400 Bux fixes and cleanup
placeable_objects cleaned up white space and removed commented out code

points: issue with teleporting outside of a cell. Does not fire onremove event functions. Fixed

utility: Implemented fix for special characters for blips.

dialogue: upped wait time on close. This allows use to reopen the menu right away without firing the animation to close
2025-11-14 18:36:35 -06:00
Mr.Crowley 05bee5e743 Hotfix
doubled grid size to accomidate cayo and hopefully ny
2025-10-14 00:26:48 -05: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
Mr.Crowley 8215a16c27 Add deprecated args field to Point.Register
Introduces a self.args field to the Point.Register function, marked as deprecated for future removal 2025-09-10. This change preserves compatibility for code relying on the args property.
2025-09-10 17:43:18 -05:00
Mr.Crowley e7de2972fd Add client/server entity examples and improve 3D help text
Added new example scripts for client and server entity creation, demonstrating features like clothing, particles, scenarios, and targets. Enhanced Utility.Draw3DHelpText to support multi-line text and improved background rendering for better readability.
2025-09-10 10:45:10 -05: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 debfb06231 Refactor stash and targets behavior logic
Simplifies stash target assignment by returning early when registering a stash, ensuring consistent target setup. Enhances target update logic to check for removed targets and removes debug print statement.
2025-09-04 08:21:48 -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 dff4622a94 Refactor entity behavior to use Bridge.Entity
Replaces all usage of Bridge.ClientEntity and Bridge.ServerEntity with Bridge.Entity across shared behavior modules. Updates initialization in lib/init.lua to use cLib.Entity and marks cLib.ClientEntity and cLib.ServerEntity as deprecated for consistency and future maintainability.
2025-09-03 04:06:31 -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 b0f5cd85a9 Add dialogue example script
Introduces a Lua script demonstrating a simple NPC dialogue interaction using Bridge.Dialogue. The script spawns a ped, opens a dialogue menu, and handles user selections with follow-up actions.
2025-08-31 03:23:09 -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 59fa75a618 Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev 2025-08-22 16:49:24 -05:00
Mr.Crowley fcd279b30a Zones compatibility
Createzone, remove zone, cleanup on resource stop, cleanup on invoked resource stop,
2025-08-22 16:49:17 -05:00
Mr.Crowley 2da3fed196 following convention for blips
switched to follow naming convention for others
2025-08-22 03:33:42 -05:00
Mr.Crowley 4e313c40cb Update to utility for blip
added .CreateBlipRadius which makes a circular blip with some radius in meters
2025-08-22 03:27:03 -05:00
Mr.Crowley a1181c2758 distance compatibility 2025-08-21 02:27:38 -05:00
Mr.Crowley d0d72bdba5 here we go again 2025-08-21 00:09:54 -05:00
Mr.Crowley cba3ba1d98 forgot to save init file 2025-08-20 23:51:03 -05:00
Mr.Crowley f900bc5ce1 Clean up 2025-08-20 23:49:22 -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 cdeba0652d Community Feedback on cache
serverid in cache is pointless and will never change

unit tests are not actually unit tests so i renamed to examples.
2025-08-18 18:32:38 -05:00
Mr.Crowley c34b1cce27 Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev 2025-08-16 19:28:09 -05:00
Mr.Crowley 6106f76b2d small mistake
got rid of cellkey as it was clamped to a 10 meter radius, replaced with id
2025-08-16 19:27:06 -05:00
Mr.Crowley 972399ebf6 forogt a print 2025-08-15 23:58:29 -05:00
Mr.Crowley 255462493f cache error fix 2025-08-15 23:57:31 -05:00
Mr.Crowley bdde5124ff Simplified Points
Reduced code and calculations should hopefully be more performant
2025-08-15 23:54:55 -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
Mr.Crowley 140bad5b34 made woopsie to entities 2025-08-05 20:57:26 -05:00
Mr.Crowley a1e65a7dff made some changes to input and target
targets now accept event

fixed a check for .action passed to ox fix options

input will now return in qbs format if qb is used (passed as true).. this makes converting qb resources infinitely simpler
2025-07-29 05:22:55 -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 eb8a7e4449 forgot 1 2025-07-28 00:21:57 -05:00
Mr.Crowley 2174213f8d woopsies 2025-07-28 00:21:30 -05:00
Mr.Crowley 466e86bfdb targets and inventory update
Targets:

sphearzone should not take a heading, removed

optional debug at the end for individual debugging

Inventory:

Added OpenPlayerInventory for all inventories.
2 (aka codem and qs) did not have clear documentation. Probably doesnt work
2025-07-28 00:10:51 -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 1ebcb8f492 some other stuff
yum
2025-01-18 05:31:33 -06:00
gononono64 5f21f2b14e forgot to save client.lua 2025-01-16 00:58:49 -06:00
gononono64 848864d686 woops
fix hopefully oxlib menu compat
2025-01-16 00:53:51 -06:00
gononono64 d61070620a Fixed menus....again 2025-01-14 12:30:29 -06:00
gononono64 2467aa31a0 fixed some stuff
involved word casing and register useable doing stuff in a tidy way uhhhhhhh... fuck you qwezert
2025-01-14 10:55:14 -06:00
gononono64 4a70083bf6 0.1.4
0.1.4:
Manifest change to reflect file name changes
Separated menu for future compatibility (other menu systems)

New features:
   - Callbacks:
         - From client to server back to client
         - From server to specific client and back.
2025-01-14 09:44:30 -06:00
gononono64 fc2bb50939 Callbacks update
Callbacks:
Client to server to client
-> has ability to trigger on all clients

Server to client to server

Unit test

Moved tables from use to utilities
2025-01-09 09:40:40 -06:00