[RE-RELEASE] esx_eden garage2: 3 in 1 garage

I want the player to pay for the repair in order to save the vehicle

thats up to you to do it :slight_smile: 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 ?

2 Likes

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.

I clear the cache and still same problem

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 :wink:

1 Like

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

1 Like

Taht issue is Al ready been fixed