Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(citizen-server-impl): send clients net id in an entity event #3171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csskroubledev
Copy link

Goal of this PR

Send net ID of the client that created the entity to events entityCreating, entityCreated respectively.
This way, developers don't have the need to call NetworkGetFirstEntityOwner the second time, because the data will be sent as "source".
...

How is this PR achieving the goal

It is utilizing already provided client data, to send netId to the TriggerEvent2 function which in result allows developers to use the variable "source" (in Lua, can be different in other runtimes).
...

This PR applies to the following area(s)

FiveM, Server, Natives
...

Successfully tested on

Game builds: 3095

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant