Skip to content

Conversation

@AvarianKnight
Copy link
Contributor

@AvarianKnight AvarianKnight commented Jan 16, 2026

Goal of this PR

Get feature parity for raw emitters and regular emitters

This makes it a lot easier to work with protobufs where the situation arises where we
need a more efficient packing format.

How is this PR achieving the goal

Adds onRawNet, emitRawNet, emitRaw and removeRawEventListener

This PR applies to the following area(s)

JS

Successfully tested on

Game builds: ..

Platforms: Windows, Linux

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.

This adds global definitions for functions that previously didn't have any:
- printError
- RegisterNetEvent
- Citizen.invokeNativeByHash
- msgpack_pack
- msgpack_unpack

This removes an old global declaration for a function that doesn't exist
- Citizen.invokeFunctionReference

Adjusts `SendNUIMessage` to only take `object` types, since it requires
an object type for JSON.

This adds a bunch of documentation to all of the global functions to try
and describe what they do
This unifys some internal logic for how emitters are registered so they
behave the same for raw/regular emitters, making it so you don't have to
do a bunch of internal calls that most people wouldn't know about
@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Jan 16, 2026
@AvarianKnight AvarianKnight changed the title feat(scripting/v8): add and update global declarations documentation feat(scripting/v8): add better api for doing raw events Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Needs a preliminary assessment to determine the urgency and required action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant