Skip to content

Conversation

@jamazzz
Copy link
Contributor

@jamazzz jamazzz commented Dec 18, 2025

Pull Request Checklist

  • PR is targeting the dev branch
  • I have pulled the latest changes from dev and resolved any merge conflicts
  • My code follows the project’s style guidelines
  • I have tested my changes and ensured they work as expected
  • Relevant documentation/comments have been added or updated
  • Any dependent changes have been merged

Resource Relevance and Usage

  • Resource is active on 100+ servers, OR
  • Resource has a verifiable dependency on community_bridge, OR
  • Exception justified (adds value or supports project goals)

Avoiding Breaking Changes

  • No breaking changes introduced, OR
  • If deprecating: 2-4 month grace period provided
  • Deprecation notices clearly documented in code with dates

Documentation and Testing

  • At least one usage example included.
  • IntelliSense-style comments added.
  • Unit test coverage provided

Description

This PR allows users to have more control over entities by allowing them to freeze, ignore gunshots, and make them invincible
It also improves the logic for the entityType object by actually swapping it instead of deleting and creating it.

Testing Steps

Create a ped type entity and apply the following parameter

        invincible = true,
        freeze = true,
        ignoreGunshots = true,

Check if Ped is frozen, invincible, and that he ignores shots

Create an object type entity and use Bridge.ClientEntity.ChangeModel to change the model and check if it changes for all clients, whether spawned or not

Additional Notes

Made sure to keep the original state of the bridge, so for example, in freeze it will be by default frozen, and in invincible by default false

- add freeze parameter to control entity position locking
- add ignoreShoots parameter to block non-temporary events
- add invincible parameter to prevent entity damage
@jamazzz
Copy link
Contributor Author

jamazzz commented Dec 18, 2025

Entity swapping might have a bug still testing
After testing it for a bit found that the issue occurs after leaving the area and rejoining it

@gononono64
Copy link
Contributor

This looks good. I dont see any major mistakes. Will test in a bit

@MrNewb
Copy link
Contributor

MrNewb commented Dec 27, 2025

@gononono64

2 fixes. Properly defaults to true if entity.freeze is not provided. If false is provided should now allow for unfrozen stuff. Needed to remove the freeze action in the update loop.
Also got rid of commented code while i was at it
@gononono64
Copy link
Contributor

gononono64 commented Dec 27, 2025

@jamazzz you mind doing a quick test of my changes. I confirmed that yours was working except for freeze. Would not allow for an entity to be declared as non frozen. Otherwise this is good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants