removeVehicleUpgrade | Multi Theft Auto: Wiki Skip to content

removeVehicleUpgrade

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function removes an already existing upgrade from the specified vehicle, eg: nos, hydraulics. Defined in San Andreas\data\maps\veh_mods\veh_mods.ide.

Syntax

removeVehicleUpgrade ( )

Code Examples

server

This script defines a 'nos' console command that adds a NOS upgrade to the vehicle that the player who executes the command is sitting in. It also adds a 'removenos' command which allows removal of a player's nos.

function addNOS ( sourcePlayer, command )
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
addVehicleUpgrade ( theVehicle, 1010 ) -- NOS 10x
end
end
addCommandHandler ( "nos", addNOS )
function remNOS ( sourcePlayer, command )
theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
if ( theVehicle ) then
removeVehicleUpgrade ( theVehicle, 1010 )
end
end
addCommandHandler ( "removenos", remNOS )

See Also

Vehicle Functions