Try this:
function playEnterVeh ( theVehicle, seat )
local upgrades = getVehicleCompatibleUpgrades ( theVehicle )
for upgradeKey, upgradeValue in ipairs ( upgrades ) do
outputChatBox ( getVehicleUpgradeSlotName ( upgradeValue ) .. ": " .. upgradeValue )
end
end
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), playerEnterVeh )