Hello Guys i need help for color cars


#1

Hello guys Could help me how to add colors when spawning a vehicle? please

in code spawn

RegisterNetEvent(‘policeg:c_classict’)
AddEventHandler(‘policeg:c_classict’, function()
Citizen.Wait(0)
local myPed = GetPlayerPed(-1)
local player = PlayerId()
local vehicle = GetHashKey(‘tornado’)
RequestModel(vehicle)
while not HasModelLoaded(vehicle) do
Wait(1)
end
local plate = math.random(100, 900)
local coords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0, 5.0, 0)
local spawned_car = CreateVehicle(vehicle, coords, -188.714736938477, -1632.88928222656, 33.2873649597168, true, false)
SetVehicleOnGroundProperly(spawned_car)
SetVehicleNumberPlateText(spawned_car, "groove “…plate…” ")
SetPedIntoVehicle(myPed, spawned_car, - 1)
SetModelAsNoLongerNeeded(vehicle)
Citizen.InvokeNative(0xB736A491E64A32CF, Citizen.PointerValueIntInitialized(spawned_car))
end)