setVehicleNitroLevel | Multi Theft Auto: Wiki Skip to content

setVehicleNitroLevel

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 sets the nitro level of the vehicle.

Caution

Only works if the vehicle is streamed in.

Syntax

setVehicleNitroLevel ( )

Code Examples

client

This function installs nitrous to the vehicle and sets the level of it to 0.1 when a player enters the vehicle.

function changeNitroLevel(pPlayer)
if pPlayer == localPlayer then
if not getVehicleUpgradeOnSlot(source, 8) then -- Check if the vehicle has nitro in it or not
addVehicleUpgrade(source, 1010) -- Install nitrous
end
setVehicleNitroLevel(source, 0.1) -- Set a nitro level of 0.1 to the vehicle
end
end
addEventHandler("onClientVehicleEnter", root, changeNitroLevel)

See Also

Vehicle Functions