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

add server side playerLoggedOut Event Handler #503

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

ARSSANTO
Copy link
Contributor

@ARSSANTO ARSSANTO commented Jul 3, 2024

Description

This event will work as handler like

-- Add any additional event handlers for player logout
-- Server Side
AddEventHandler('qbx_core:server:playerLoggedOut', function(source)
    -- Add any additional actions you want to perform when a player logs out
    print('Player with source ID ' .. source .. ' has logged out.')
end)

Checklist

  • [yes ] I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • [ yes] My pull request fits the contribution guidelines & code conventions.

Copy link
Member

@Manason Manason left a comment

Choose a reason for hiding this comment

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

What's the use case for this? Do you have a specific need in mind?

@ARSSANTO
Copy link
Contributor Author

ARSSANTO commented Jul 4, 2024

What's the use case for this? Do you have a specific need in mind?

Yes I have and already using it so on the server side there if this event triggers I can send logs then also I can delete props from logged out player very easily and many more server side action can be taken directly while player logged out .

rather going to client side and back to server side

AddEventHandler('qbx_core:server:playerLoggedOut', function(source)
    -- Add any additional actions you want to perform when a player logs out
    print('Player with source ID ' .. source .. ' has logged out.')
end)

@FjamZoo
Copy link
Contributor

FjamZoo commented Jul 5, 2024

What's the use case for this? Do you have a specific need in mind?

Its a good addition makes it so we dont need to use the standard "onPlayerDrop" event while also supporting logging out of multi characters.

@FjamZoo FjamZoo merged commit a50594f into Qbox-project:main Jul 5, 2024
2 checks passed
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.

None yet

3 participants