mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:01:24 +00:00
Forces cars to spawn clean
Will ensure cars spawn cleaned instead of random levels of dirt.
This commit is contained in:
@@ -134,6 +134,7 @@ RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
|
||||
local vehicle = CreateVehicle(hash, GetEntityCoords(ped), GetEntityHeading(ped), true, false)
|
||||
TaskWarpPedIntoVehicle(ped, vehicle, -1)
|
||||
SetVehicleFuelLevel(vehicle, 100.0)
|
||||
SetVehicleDirtLevel(vehicle, 0.0)
|
||||
SetModelAsNoLongerNeeded(hash)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(vehicle))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user