getVehicleUpgradeOnSlot | Multi Theft Auto: Wiki Skip to content

getVehicleUpgradeOnSlot

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 returns the current upgrade id on the specified vehicle's 'upgrade slot' An upgrade slot is a certain type of upgrade (eg: exhaust, spoiler), there are 17 slots (0 to 16).

Syntax

getVehicleUpgradeOnSlot ( )

Code Examples

server

This example prints the name and upgrades on each slot of an entered vehicle to the chat.

function scriptOnPlayerEnterVehicle ( theVehicle, seat, jacked )
for i=0, 16 do
local upgrade = getVehicleUpgradeOnSlot ( theVehicle, i )
if ( upgrade ) then
outputChatBox ( getVehicleUpgradeSlotName ( i ) .. ": " .. upgrade)
end
end
end
addEventHandler ( "onPlayerVehicleEnter", root, scriptOnPlayerEnterVehicle )

See Also

Vehicle Functions