-
Notifications
You must be signed in to change notification settings - Fork 15
fix(server/vehicle): use correct export for vehicle getters and add missing TS export #6
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
Conversation
Thanks for the PR. The addition of However your change to
|
Okay, think I got it. I'll implement these changes now. |
Should be good to go 👍🏻 |
will wait for @antond15 to double check before merging |
All done :) Thank you for spotting these! |
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.
LGTM
This PR aims to fix an oversight that mostly affects TypeScript users. Currently, the only way to get a vehicle using its entity ID in TypeScript is through
GetVehicle
. However, that function uses an export that does not exist, at least not anymore.In lua, users are able to use the function
Ox.GetVehicleFromEntity
, which works as it should. In TS, there is no function under that name.This PR aims to fix this problem by adding the
GetVehicleFromEntity
function to TypeScript and using the correct exports inGetVehicle
functions, which are only kept because, if they were removed, it would break a lot of scripts no matter the environment.I am however going to need a say from maintainers on whether if it is a good idea to keep the GetVehicle function or remove the GetVehicleFromEntity function and keep the first one.
Fixes #5.