SetVehicleNitroActivated: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|4.0140|1.3.1|4993| This function activate the nitro on the vehicle. }} ==Syntax== <syntaxhighlight lang="lua">bool setVehicleNitroActivat...")
 
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 activate the nitro on the [[vehicle]].
This function activate the nitro on the [[vehicle]].
}}
}}

Revision as of 16:48, 7 February 2013

ADDED/UPDATED IN VERSION 1.3.1 r4993:

This function activate the nitro on the vehicle.

Syntax

bool setVehicleNitroActivated ( vehicle theVehicle, bool state )

Required Arguments

  • theVehicle The vehicle which you want to check an activation.
  • state true if you want to activate the nitro, false if you want to disable it.

Returns

Returns true if the nitro is activated successfully on the vehicle, false otherwise.

Example

addEventHandler( 'onClientVehicleEnter', root,
	function( pPlayer )
		if pPlayer == localPlayer then
			addVehicleUpgrade( source, 1010 ) -- Install a nitro.
			setVehicleNitroActivated( source, true ) -- Activate the nitro.
		end
	end
)

Requirements

This template will be deleted.

See Also