SetVehicleDamageProof: 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__
This function allows you to trigger a function after a number of milliseconds have ellapsed. You can call either your own functions, or built in functions. For example, you could set a timer to spawn a player after a number of seconds had ellapsed.
Once a timer has finished repeating, it no longer exists.
The minimum accepted interval is 50ms.
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof )            
bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof )
</syntaxhighlight>
 
===Required Arguments===
*'''theVehicle:''' The vehicle you wish to set damage proof.
*'''damageProof:''' true to set the vehicle damage proof, false otherwise.
 
===Optional Arguments===
{{OptionalArg}}
(none)
 
===Returns===
Returns ''true'' if the vehicle was set damage proof succesfully, ''false'' if the arguments are invalid or it failed.
 
==Example==
This example spawn a vehicle and sets it damage proof immediately.
 
<syntaxhighlight lang="lua">
local vehicle = createVehicle(602,0,0,6)
setVehicleDamageProof(vehicle,true)
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{Vehicle functions}}

Revision as of 19:50, 25 July 2007

This function allows you to trigger a function after a number of milliseconds have ellapsed. You can call either your own functions, or built in functions. For example, you could set a timer to spawn a player after a number of seconds had ellapsed.

Once a timer has finished repeating, it no longer exists.

The minimum accepted interval is 50ms.

Syntax

bool setVehicleDamageProof ( vehicle theVehicle, bool damageProof )

Required Arguments

  • theVehicle: The vehicle you wish to set damage proof.
  • damageProof: true to set the vehicle damage proof, false otherwise.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments. (none)

Returns

Returns true if the vehicle was set damage proof succesfully, false if the arguments are invalid or it failed.

Example

This example spawn a vehicle and sets it damage proof immediately.

local vehicle = createVehicle(602,0,0,6)
setVehicleDamageProof(vehicle,true)

See Also