GetVehicleNitroLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|4.0140|1.3.1|4993|
{{New feature/item|4.0132|1.3.1|4993|
This function get the nitro level from the [[vehicle]].
This function get the nitro level from the [[vehicle]].
}}
}}

Revision as of 16:48, 7 February 2013

ADDED/UPDATED IN VERSION 1.3.1 r4993:

This function get the nitro level from the vehicle.

Syntax

float getVehicleNitroLevel ( vehicle theVehicle )

Required Arguments

  • theVehicle The vehicle which you want to get a nitro level.

Returns

Returns the nitro level [ range is 0.0 to 1.0 ] from the vehicle.

Example

addEventHandler( 'onClientVehicleEnter', root,
	function( pPlayer )
		if pPlayer == localPlayer then
			local fNitroLevel = getVehicleNitroLevel( source )
			outputChatBox( 'Your nitro level for vehicle ' .. getVehicleName( source ) .. ' is ' .. fNitroLevel .. '.' )
		end
	end
)

Requirements

This template will be deleted.

See Also