Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

[Suggestion] Add Latent Server Callback Support #651

Closed
@FingerlessGlov3s

Description

@FingerlessGlov3s

Is your feature request related to a problem? Please describe.
You can use TriggerLatentClientEvent function to send data to a client that doesn't block the clients network channel. So it would be great if we could register a latent callback instead when needed. This would be more flavourful when sending large amounts of data or for non time critical events, to stop blocking of the client network channel.

Describe the solution you'd like
A function like lib.callback.register call it say lib.callback.registerLatent, which uses TriggerLatentClientEvent instead of TriggerClientEvent for client and TriggerLatentServerEvent instead of TriggerServerEvent for server.

Default of bps of 50000 with an argument to higher or lower it.

Additional context
https://docs.fivem.net/docs/scripting-manual/working-with-events/triggering-events/#triggering-latent-server-events
https://docs.fivem.net/docs/scripting-manual/working-with-events/triggering-events/#triggering-latent-client-events

Hope this makes sense 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions