Skip to content

Instantly share code, notes, and snippets.

@Rasinzz
Last active June 12, 2022 20:07
Show Gist options
  • Save Rasinzz/24490103152c05e42776276d11ec12ba to your computer and use it in GitHub Desktop.
Save Rasinzz/24490103152c05e42776276d11ec12ba to your computer and use it in GitHub Desktop.
FiveM upgrade vehicle
RegisterCommand('upgrade', function()
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
local modTypes = {11, 12, 13, 15, 16}
SetVehicleModKit(vehicle, 0) -- must call to apply mods
for _, modType in ipairs(modTypes) do
local maxMod = GetNumVehicleMods(vehicle, modType) - 1
SetVehicleMod(vehicle, modType, maxMod, false)
end
ToggleVehicleMod(vehicle, 18, true)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment