Last active
June 12, 2022 20:07
-
-
Save Rasinzz/24490103152c05e42776276d11ec12ba to your computer and use it in GitHub Desktop.
FiveM upgrade vehicle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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