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

feat: qb-vehiclekeys bridge #132

Merged
merged 1 commit into from
Sep 28, 2024
Merged

feat: qb-vehiclekeys bridge #132

merged 1 commit into from
Sep 28, 2024

Conversation

Manason
Copy link
Member

@Manason Manason commented Sep 28, 2024

This PR adds backwards compatibility with qb-vehiclekeys events and exports to Give, Remove, & check if a player has keys to a certain vehicle plate. This is done by searching through the vehicles to find the vehicles with the matching plate and then invoking native qbx_vehiclekeys functions to handle the rest. This means that if multiple vehicles have the same plate, these compatibility functions will operate on all of them. The bridge can be enabled/disabled via convar.

Other misc refactors done as part of this PR to support the bridge:

  • made fxmanifest files more specific
  • made client HasKeys a global function
  • renamed server/keys.lua keysList and keysLifeTime to better reflect their use
  • moved server HasKeys to keys.lua
  • added some early return conditions in keys.lua

@Manason Manason merged commit 738744b into main Sep 28, 2024
4 checks passed
@Manason Manason deleted the feat-qb-bridge branch September 28, 2024 16:10
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.

2 participants