Skip to content

feat(callback): add AwaitClientCallback function#1629

Merged
Zykem merged 3 commits intoesx-framework:devfrom
Mirrrrrow:dev
Apr 23, 2025
Merged

feat(callback): add AwaitClientCallback function#1629
Zykem merged 3 commits intoesx-framework:devfrom
Mirrrrrow:dev

Conversation

@Mirrrrrow
Copy link
Copy Markdown
Contributor

Description

Adds the ESX.AwaitClientCallback function.
#1628


Motivation

To match ESX.AwaitServerCallback and just personal preference.


Implementation Details

Added the same logic that is used on the client-side to await the server callbacks.

Usage Example

local data = ESX.AwaitClientCallback(source, 'test:client:receiveData', false)
print(json.encode(data))

Which can be seen equivalent to

ESX.TriggerClientCallback(source, 'test:client:receiveData', function(data)
    print(json.encode(data))
end)

PR Checklist

  • My commit messages and PR title follow the Conventional Commits standard.
  • My changes have been tested locally and function as expected.
  • My PR does not introduce any breaking changes.
  • I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

@github-project-automation github-project-automation bot moved this to 🆕 To be Discussed in ESX Roadmap Apr 1, 2025
Zykem
Zykem previously approved these changes Apr 2, 2025
Copy link
Copy Markdown
Contributor

@Zykem Zykem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Mirrrrrow
Copy link
Copy Markdown
Contributor Author

Mirrrrrow commented Apr 4, 2025

Well I was in the wrong branch the last commit wasn't inteded 😂 I reverted it sorry

@Mirrrrrow Mirrrrrow requested a review from Zykem April 4, 2025 15:26
Copy link
Copy Markdown
Contributor

@Zykem Zykem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation bot moved this from 🆕 To be Discussed to Ready for Next Update in ESX Roadmap Apr 5, 2025
@Mirrrrrow
Copy link
Copy Markdown
Contributor Author

Are the PRs merged when a new version is beeing released or before? Messed up something with my branches and I don't want to break something again here lmao

@Mirrrrrow
Copy link
Copy Markdown
Contributor Author

Any updates?

@Zykem
Copy link
Copy Markdown
Contributor

Zykem commented Apr 23, 2025

Documentation update regarding your Pull Request.
esx-framework/esx-legacy-documentation@bb8acad

@Zykem Zykem merged commit 60deeda into esx-framework:dev Apr 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for Next Update

Development

Successfully merging this pull request may close these issues.

4 participants