Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

[question] is there a way to park the car without repair it? #180

Open
Arsalan0098 opened this issue Aug 29, 2020 · 9 comments
Open

[question] is there a way to park the car without repair it? #180

Arsalan0098 opened this issue Aug 29, 2020 · 9 comments
Labels
Enhancement New Feature or Request

Comments

@Arsalan0098
Copy link

hello. i want an option to not repair the car when putting it in garage. for example if a car is broken and you park it, next time you try to get it out of garage it come out like it was. is there anyway to do this?
thanks for release

Questions
Have you made changes to anything in client/main.lua or server/main.lua?: no
Have you looked through the Closed Topics?: yes
Have you looked through the Wiki?: yes
Are you using a Pre-Installed ESX? If Yes who?: no
Are you using es_extended? If Yes what Version? (Example: 1.2): 1.2
Are you using Essentialmode?: no
Are you using ExtendedMode?: no
Are you using OneSync?: yes
Linux or Windows?: win

@Arsalan0098 Arsalan0098 added the Bug Something isn't Working. label Aug 29, 2020
@Arsalan0098 Arsalan0098 changed the title is there a park the car without repair it? [question] is there a way to park the car without repair it? Aug 29, 2020
@HumanTree92
Copy link
Owner

I've tried to get something like this to work. But sadly in my testing there was always bugs. You can try to do something yourself.

@HumanTree92 HumanTree92 added Not an Issue Not an Issue / Won't Fix and removed Bug Something isn't Working. labels Aug 29, 2020
@Arsalan0098
Copy link
Author

cant you take a look at loaf garage or np garage? i have them if you need, so maybe you can figure it out how it works cuz they are working for me when i park the car and try to get the car back its like before.
discord Arsalan#6985

@HumanTree92
Copy link
Owner

I can take a look at them. It's just taking code from someone else's script is not what i do. Not without permission. And most Script Devs take way to long to respond. And if they don't respond then i have to write my own. Currently i am working on trying to get my server back up & running so my time working on scripts for the public is low.

@Arsalan0098
Copy link
Author

Ok. sounds fair, let me know if you need some help, im not that good but i can help some :P also if you need key i can give you

@Arsalan0098
Copy link
Author

hey man, sorry but i was wondering that did you find a way to make it work or still working on other project? :P cuz i need it alot and was waiting for you :P

@HumanTree92
Copy link
Owner

Not yet man. Been really busy working with updating scripts & i just recently got hired to Dev for another FiveM server. I will take a look into when i get some free time. Been working very hard to try & get my server up since its been down for almost a yr now.

@HumanTree92 HumanTree92 added Enhancement New Feature or Request and removed Not an Issue Not an Issue / Won't Fix labels Nov 29, 2020
@Skattefar
Copy link

Anyone made it yet?

@astron51
Copy link

astron51 commented Aug 12, 2021

image
Look for every entry for RepairVehicle and edit it
image

This way it will save the car without asking you to repair it.
For saving the damage for next spawn, You need to modify what data you send to
esx_advancedgarage:setVehicleState
For instance
TriggerServerEvent('esx_advancedgarage:setVehicleState', vehicleProps.plate, true) < the orignal code from StoreVehicle Function

Pass Engine Health, Body Health or Tank Health you name it to setVehicleState
eg. TriggerServerEvent('esx_advancedgarage:setVehicleState', vehicleProps.plate, true, 1000 --[[Engine Health]])
And you need to modify setVehicleState to write the Engine Health to the database

Add another column in the owned_vehicle table that store the Health Value for next spawn.
You cannot store the body deform of the vehicle.

After all that, you need to modify the SpawnVehicle function that apply the Health to the vehicle after spawned.
Can't show any example or image to make sure y'all do it yourself ( In case you didn't even try to look into the code and straight up saying "I cAn'T dO iT" ).

@a3rgames
Copy link

is this woking on new one ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New Feature or Request
Projects
None yet
Development

No branches or pull requests

5 participants