[RE-RELEASE] esx_eden garage

garage
esx

#192

For me it’s automaticly with set vehicle properties because I did change es extended


#193

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


#194

thats up to you to do it :slight_smile: how you want


#195

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


#196

you have to put getvehiclehealth and setvehiclehealth in es_extended. you did both ?


#197
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 ?


#198

use this instead of getentityhealth
bodyHealth = GetVehicleBodyHealth(vehicle),
engineHealth = GetVehicleEngineHealth(vehicle),


#199

THE NEW version is compatible with the new version of esx_vehicleshop. now PK is plate!


#200

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’


#201

i ll look at it normally should work


#202

clear your cache and try again, because that code was already in eden garage and should not give any error.


#203

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.


#204

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


#205

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.


#206

I clear the cache and still same problem


#207

Try instead modifystate true to put 1 instead


#208

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:


#209

have as to put to only have a player in the car when it comes to storing in the garage


#210

because if you have two at the time of storing the vehicle you can duplicate the cars infinitely


#211

Taht issue is Al ready been fixed