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

Vehicle Keys #6

Open
happensinthegame opened this issue May 15, 2024 · 2 comments
Open

Vehicle Keys #6

happensinthegame opened this issue May 15, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@happensinthegame
Copy link

For some reason, I don't get the vehicle keys after choosing a vehicle for rental and I don't see GiveKeys or anything related in the script. Is there a way to receive the keys?

@wilodonny
Copy link

wilodonny commented May 26, 2024

functions.txt
I have semi fixed this assuming you use qb-core , i dont know how to add the code into the github for you to just copy paste so i have provided in a .txt format just rename to functions.lua and replace yours after making a backup incase you need to revert back to it in the ry_rent/client folder.

this does give an error in txadmin of

[ script:qb-core] SCRIPT ERROR: @qb-core/server/player.lua:295: bad argument #1 to 'floor' (number expected, got nil)
[ script:qb-core] > ref (@qb-core/server/player.lua:295)
[ script:qb-core] > handler (@ry_rent/server/main.lua:69)
[ script:ry_rent] SCRIPT ERROR: error object is not a string

which hopefully the creator can resolve but even though this error triggers it works fine for me with qb-vehiclekeys version 1.2.5

@redyydev
Copy link
Owner

redyydev commented May 26, 2024

Hello, thank you @wilodonny for helping. Im on vacation but when i come back i'il add the function for vehicle keys and some news too.

Replying to the error, maybe try this
replace:
TriggerServerEvent("qb-vehiclekeys:server:AcquireVehicleKeys", plate)
with:
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(vehicle))

@redyydev redyydev self-assigned this May 26, 2024
@redyydev redyydev added the question Further information is requested label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants