[QB] HH Vehicle Extras [Release/Free]

Description :

  • This is a free script that we are releasing this is a very basic and useful script for admins and normal players for usual RP the admins will be able to give the vehicle to anyone on the server with a custom or random plate number in the server, whereas for civilians they will be able to transfer vehicles to anyone in the city!; else preview is uploaded below!

Features :

  • A single command to give a car to anyone in the server /givecar [id] [vehiclename] [licenseplate] *Only admins! Note: If a plate is none will randomly generate a new plate
  • The license plate will be saved in the database which will be a huge relief as it won’t be an error or disappearing or changing of license plates
  • The vehicles will be differentiated on the basis of their license plates means the best part is they cant spawn two vehicles on the same license plate
  • We have also added a brand new feature of transfer vehicle which is the best as you guys can transfer the vehicle within the server with a solo command
  • This will also be differentiated according to the license plates which means there will be no mismatch in transferring vehicles to the other!
  • So we have added a command /transfercar [id] you will be supposed to be sitting in the vehicle to do this so that there will be no mismatch and the guy will
    receive the vehicle! (As some vehicles don’t have visible number plates!)
  • As this is a release you guys have any questions and have some good changes feel free to put some pull requests on GitHub

COMMANDS

  • /givecar [id] [vehiclename] [licenseplate]
  • /transfercar [id]

NOTIFICATIONS

image
image
image

PREVIEW

DOWNLOAD

:warning:NOTE

10 Likes

Realy nice Release :heart_eyes:

1 Like

nice scrip bro

1 Like

Any chance of an esx version

2 Likes

Unlisted for 24 hours due to use of alt accounts on post

Okay they can park the vehicle when they get it but it doesnt appear in garage

1 Like

Check whether that vehicle is registered in shared.lua this happens when you haven’t registered particular vehicle in shared.lua.

So currently dealing with this bug:


any ideas as to whats causing it?

please download the latest one and which framework are you using btw??

I’ve got the same problem as WolfieValeoOfficial and there is no newer version and im running the newest txadmin on qbcore and get the same error. do i have to add anything to qbcore?

Everything appears to be working fine as it is not throwing any errors in F8 or in live console. My problem is, is that after doing the give car command and the player receiving it they are told that they do not own the vehicle when going to store in garage. Any thought on what my be causing the script to not write to DB?

i made a push whit fix for the last version of qbcore

sorry for late response, using latest qb-core.

its telling me i cant store vehicles idk what im doing wrong any help is appreciated

[ script:hh_vehextras] Error loading script server.lua in resource hh_vehextras: @hh_vehextras/server.lua:44: attempt to index a nil value (global ‘QBCore’)
[ script:hh_vehextras] stack traceback:
[ script:hh_vehextras] @hh_vehextras/server.lua:44: in main chunk

am getting this

did u find a fix im getting the same error

Here is a guide to everyone with the same error as Taz96

SERVER: Replace this (server.lua line 1 to 2):

QBCore = nil
TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end)

with this:
local QBCore = exports['qb-core']:GetCoreObject()

CLIENT: Replace this (client.lua line 1-8):

local QBCore = nil

Citizen.CreateThread(function()
  	while QBCore == nil do
      TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end)
      Citizen.Wait(200)
  	end
end)

With this:
local QBCore = exports['qb-core']:GetCoreObject()

I don’t know if you have changed the ghattimysql exports to oxmysql but you will need to do that too.

And I found this issue too, which is easy to miss, making the vehicle not transfer and just have no owner. Make sure to change @steam to @license at line ~107.

All these errors due to the QB framework changing has made the script appear broken but actually quite easy to fix.

Am getting we’re it want give imported cars to people

Did you add them to the vehicles.lua file in qb-core/shared?