SetVehicleNitroLevel

From Multi Theft Auto: Wiki
Revision as of 15:29, 7 February 2013 by Kenix1 (talk | contribs) (Created page with "__NOTOC__ {{Client function}} {{New feature/item|4.0140|1.3.1|4993| This function set the nitro level to the vehicle. }} ==Syntax== <syntaxhighlight lang="lua">bool setVehicleNitroLevel ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.3.1 r4993:

This function set the nitro level to the vehicle.

Syntax

bool setVehicleNitroLevel ( vehicle theVehicle, float level )

Required Arguments

  • theVehicle The vehicle which you want to set.
  • level Nitro level you want to set [0.0-1.0].

Returns

Returns true if the nitro level was set successfully to the vehicle, false otherwise.

Example

addEventHandler( 'onClientVehicleEnter', root,
	function( pPlayer )
		if pPlayer == localPlayer then
			addVehicleUpgrade( source, 1010 ) -- Install a nitro.
			setVehicleNitroCount( source, 101 ) -- Set up an infinite nitro.
		end
	end
)

Requirements

This template will be deleted.

See Also