I want the player to pay for the repair in order to save the vehicle
thats up to you to do it how you want
I have had all the things in es_extended for the vehicles health , the vehicle.props are no store in the database , but when i takeout a vehicule he has a low enginehealth that not corresponding with the database
you have to put getvehiclehealth and setvehiclehealth in es_extended. you did both ?
ESX.Game.GetVehicleProperties = function(vehicle)
local color1, color2 = GetVehicleColours(vehicle)
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
return {
model = GetEntityModel(vehicle),
plate = GetVehicleNumberPlateText(vehicle),
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
health = GetEntityHealth(vehicle),
bodyHealth = GetVehicleBodyHealth(vehicle),
engineHealth = GetVehicleEngineHealth(vehicle),
fuelLevel = GetVehicleFuelLevel(vehicle),
dirtLevel = GetVehicleDirtLevel(vehicle),
...
and
ESX.Game.SetVehicleProperties = function(vehicle, props)
SetVehicleModKit(vehicle, 0)
if props.plate ~= nil then
SetVehicleNumberPlateText(vehicle, props.plate)
end
if props.plateIndex ~= nil then
SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
end
if props.health ~= nil then
SetEntityHealth(vehicle, props.health)
end
if props.bodyHealth ~= nil then
SetVehicleBodyHealth(vehicle, props.bodyHealth)
end
if props.engineHealth ~= nil then
SetVehicleEngineHealth(vehicle, props.engineHealth)
end
if props.dirtLevel ~= nil then
SetVehicleDirtLevel(vehicle, props.dirtLevel)
end
all is in es_extended/client/functions.lua
did i need to add getvehiclehealth and setvehiclehealth in addition ?
like this ?
health2 = GetVehicleHealth(vehicle),
if props.health2 ~= nil then
SetVehicleHealth(vehicle, props.health2)
end
and it will work ? i just need to get the original version of eden_garages and donāt modify it ?
use this instead of getentityhealth
bodyHealth = GetVehicleBodyHealth(vehicle),
engineHealth = GetVehicleEngineHealth(vehicle),
THE NEW version is compatible with the new version of esx_vehicleshop. now PK is plate!
Hello,
I try the new version and seems to have problem
When i try to put my car at the red circle it says no car and i have some errors on console :
GetVehicleProperties
esx_jb_eden_garage2_cl.lua:245: in function āStockVehicleMenuā
i ll look at it normally should work
clear your cache and try again, because that code was already in eden garage and should not give any error.
Iāll admit, I only skimmed through the last couple of monthās worth of post, so I may have missed my answer. However, since I updated mysql-async to v. 3.0.8, Iāve been able to take a vehicle out, leave it sitting and take it out again. I can do this over and over. It never impounds or shows out of the garage.
I get no errors in rcon or console.
I did help some one and I know my server sees 1 as true from sql but some servers sees 1 as 1.
So instead of āif state thenā You should try āif state == 1 thenā.
Normally this script has no errors nor duplication. (Because I check if entity exists)
I do understand you skipped some comment 3/4 of people were asking same questions.
This ressource should work perfectly with new version of vehicleshop
It doesnāt duplicate into the database and it does set the vehicle state when you take it out and put it in. It just ignores the state.
Try instead modifystate true to put 1 instead
Give me your discord I ll check with you if you want.
And post citizenfx. Log instead of screen where I canāt see line with error
have as to put to only have a player in the car when it comes to storing in the garage
because if you have two at the time of storing the vehicle you can duplicate the cars infinitely
Taht issue is Al ready been fixed