ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. removeVehicleUpgrade

Function

removeVehicleUpgrade

Server and clientVehiclesIdentical to MTA:SA

Removes a fitted tuning part from a vehicle. Removing nitro also clears the stored nitro charges.

Syntax

bool removeVehicleUpgrade(vehicle vehicle, int upgrade)

Arguments

vehiclevehicle
The vehicle.
upgradeint
ID of the part to remove.

Returns

true when the part was removed; false when it was not fitted.

Example

addCommandHandler("bezspojlera", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    local part = vehicle and getVehicleUpgradeOnSlot(vehicle, 2)
    if part and part ~= 0 then removeVehicleUpgrade(vehicle, part) end
end)

Notes

Client. In a client script for this player only.

See also