-
Notifications
You must be signed in to change notification settings - Fork 986
Add baseevents fallback for vehicle event triggers #1205
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
base: main
Are you sure you want to change the base?
Add baseevents fallback for vehicle event triggers #1205
Conversation
Implements client-side detection and server event triggers for entering, aborting, entering, and leaving vehicles when the 'baseevents' resource is not started. This ensures vehicle-related events are still handled even if the baseevents resource is unavailable.
Cisternita
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not useful
Why not? Why make a full event of QBCore relly on the existance of a script or not in the server and don't have a fallback? |
|
I haven't tested this event personally, but could we benefit from using the CEventNetworkPlayerEnteredVehicle game event instead of the thread? |
|
I don't think that event will detect the seat change |
|
Do you mean when someone shuffles seat without leaving the vehicle? |
|
exactly |
|
And also when entering is aborted |
|
From what I see, the current logic is: |
Description
This pull request adds a fallback implementation for vehicle-related player events in
server/events.luato ensure core vehicle event handling works even if thebaseeventsresource is not running. The new code tracks when a player enters, aborts entering, enters, or leaves a vehicle, and triggers the appropriate server events.Baseevents fallback implementation:
baseevents:enteringVehicle,baseevents:enteringAborted,baseevents:enteredVehicle,baseevents:leftVehicle) when thebaseeventsresource is not started. This ensures consistent vehicle event handling regardless of resource state.GetPedVehicleSeatto determine the seat index the player occupies in a vehicle.Checklist