Fix hotwiring bought car
Last updated
Last updated
If after you purchase a vehicle you have to hotwire it, you only have to add this simple line of code in your script code, after you know that the vehicle is added in owned_vehicles
/ player_vehicles
table (depending on the framework)
You may want to add a Citizen.Wait(2000)
before that line in case the vehicle wasn't yet in the table in the moment you triggered the event
Go to esx_vehicleshop/server/main.lua
and search for the following code:
And add this line
Go to esx_vehicleshop/server/main.lua
(the same file as before) and search for the following code:
And add this line
Go to esx_advancedvehicleshop/server/main.lua
and search for the following code:
And add this line
Go to qb-vehicleshop/server.lua
and you will have to add the following code after all exports.oxmysql:insert
In the example, it will be shown only one time, but you have to add it multiple times
And add the following code
In certain parts, you will have to replace pData
with something else, here it will show where to add the code and on what pData
depends
Note: the green circles showed in the screenshot must match, so if the first one is for example targetPlayer
, the second one must be targetPlayer
as well
Go to qb-vehicleshop/server.lua
(the same file as before) and replace all these events (they are at the bottom of the file)
with the following code
Go to okokVehicleShop/sv_utils.lua
and search for the following code:
And add this line
Go to s4-vehicleshop/server.lua
and search for the following code:
And add the following code:
Note: this code will work for both oxmysql and ghmattimysql versions
Go to t1ger_dealerships/server/main.lua
and add the following line below all codes (more than one) like as shown in the example
And add the following line
Go to t1ger_dealerships/server/main.lua
(same file as before) and search for the following code:
And add the following line