[HELP] How do I find this string kinda thing

Hi,

I want to add a add-on car to someones garage. Before I can do that, I need some kind of a string that looks like this

{“modBrakes”:-1,“modFrontWheels”:-1,“engineHealth”:1000.0,“modRightFender”:-1,“modSpeakers”:-1,“modBackWheels”:-1,“modExhaust”:-1,“windowTint”:-1,“modTurbo”:false,“modFrame”:-1,“modPlateHolder”:-1,“modTrimA”:-1,“modAerials”:-1,“dirtLevel”:6.0,“modLivery”:-1,“modWindows”:-1,“modEngineBlock”:-1,“modDial”:-1,“modFender”:-1,“color1”:4,“modSeats”:-1,“modDoorSpeaker”:-1,“modTrunk”:-1,“modHood”:-1,“modDashboard”:-1,“modSmokeEnabled”:false,“neonColor”:[255,0,255],“color2”:4,“modArchCover”:-1,“model”:-114291515,“tyreSmokeColor”:[255,255,255],“modTrimB”:-1,“wheelColor”:27,“modSteeringWheel”:-1,“bodyHealth”:1000.0,“modAirFilter”:-1,“modStruts”:-1,“modShifterLeavers”:-1,“wheels”:6,“modXenon”:false,“modHorns”:-1,“plateIndex”:3,“modEngine”:-1,“modArmor”:-1,“modHydrolic”:-1,“pearlescentColor”:111,“extras”:[],“modTank”:-1,“neonEnabled”:[false,false,false,false],“modFrontBumper”:-1,“modRoof”:-1,“modVanityPlate”:-1,“modTransmission”:-1,“modAPlate”:-1,“modSpoilers”:-1,“modGrille”:-1,“fuelLevel”:65.0,“plate”:“GCS 749”,“modSideSkirt”:-1,“modOrnaments”:-1,“modRearBumper”:-1,“modSuspension”:-1}

How can I find it?

Thanks in advance

Hey, I think you are looking for a database string in saved vehicles like this,

Screenshot_3

If so you can find it in your DB :slight_smile:

Not exactly. Yes, I am looking for that string, but the problem is, the add-on vehicle that I want the string of is not yet in the garage. I wan’t to get the string in another way.

As example :

https://runtime.fivem.net/doc/natives/#_0x6325D1A044AE510D

Use this native, and print the result in the console. Or create your own function to show it on your screen.

Hi, thanks for responding
How do you mean?

This is just an example and maybe the easiest way for you guess.

local player = GetPlayerPed(-1)
local veh = GetVehiclePedIsIn(player, false)
local GetVehModKit = GetVehicleModKit(veh)

Print(GetVehModKit)

You can do it for every informations that you need about the vehicles. Just don’t do it every tick because it will cause slowdowns due to the spamming of print.

Alright. Thanks
Btw, client.lua or server.lua?

Do this in a client script.

Doesn’t work :frowning:

You have to be in the vehicle to get the info in this case and you will see the result in the f8 console. Copy/paste your code here just to see how it look.

image

local player = GetPlayerPed(-1)
local veh = GetVehiclePedIsIn(player, false)
local GetVehModKit = GetVehicleModKit(veh)

Print(GetVehModKit)

I’m quite new to lua, so I’m probably wrong

Is it your full code ?

Yes, it is…

Ok so i can suggest you to take a look at other scripts before. Because you need to learn about fiveM scripting before doing this kind of things.

Can you help me with that?

With what ?

Writing the right code for it to work

If you can tell me exactly what you need and what you want to do yes. I can help you if you make some efforts to understand what we are doing and if you try to understand some things by yourself.