Spawn Car with mods

Hi all ! Does anyone know how can I set a car to spawn with tuning mods ? For ex: I want my police car to spawn with certain wheels, is there a way ? If it is then please tell me where to look. Thank you !

You can change the wheel type by using SetVehicleWheelType or you can change the tire by using setvehiclemod

example:

SetVehicleMod(vehicle, 23, <your wheel here>, false)

To find all the wheels(or all mods) go here and search for" enum Wheels"

1 Like

@Dutchkiller2000 Can you tell me in what meta file needs to be ? Thank you very much for the info.

that needs to be in a lua script(or c#) where you spawn the vehicle. not the meta. I dont know if you can change the wheel type in the meta file tho… Im gonne research that.

Edit: Or do you want npc vehicles spawn with custom tires?

1 Like

I’m trying to make the police cars spawn with custom wheels when i take them out from esx_policejob garage.

It could work the same way i did with this ?

function SetVehicleMaxMods(vehicle)
local props = {
modEngine = 2,
modBrakes = 2,
modTransmission = 2,
modSuspension = 3,
modTurbo = true
}

ESX.Game.SetVehicleProperties(vehicle, props)

end

1 Like

oke… if you place this:

  ESX.Game.SetVehicleProperties(vehicle, {
        wheels= <your wheel type see [this](https://pastebin.com/QzEAn02v) for type number>,
        modFrontWheels = <your custom wheel here see [this](https://pastebin.com/QzEAn02v) and search for enum Wheels>
    })

on line 336 in main.lua it should spawn the vehicle with your selected wheels

example:

  ESX.Game.SetVehicleProperties(vehicle, {
        wheels= 4 , --offroad
        modFrontWheels = 5 --WHEEL_OFFROAD_CHALLENGER
    })
1 Like

Aight, i’ll try it out ! Thank so much for your time man! God bless !

This will work too but you need to add the tires like shown below

function SetVehicleMaxMods(vehicle)
local props = {
modEngine = 2,
modBrakes = 2,
modTransmission = 2,
modSuspension = 3,
modTurbo = true,
--I added the comma above and the wheels below
wheels= 4 , --offroad
modFrontWheels = 5 --WHEEL_OFFROAD_CHALLENGER
}

ESX.Game.SetVehicleProperties(vehicle, props)

end
1 Like

Yes ! It worked ! Hi5 !!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.