IsVehicleLocked: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 4: Line 4:


==Syntax==
==Syntax==
bool [[isVehicleLocked]] ( [[vehicle]] vehicle )
<syntaxhighlight lang="lua">isVehicleLocked ( vehicle )


===Required Arguments===
===Required Arguments===
*'''vehicle''': The [[vehicle]] that you need to obtain the locked status of.
*'''vehicle''': The vehicle that you need to obtain the locked status of.


==Example==
==Example==
 
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 )
newcar = [[createVehicle]] ( 520, 1024, 1024, 1024 )
if isVehicleLocked]] ( newcar )
if [[isVehicleLocked]] ( newcar )
  serverChat ( "Vehicle is locked." )
  [[serverChat]] ( "Vehicle is locked." )
else
else
  serverChat ( "Vehicle is unlocked." )
  [[serverChat]] ( "Vehicle is unlocked." )
end</syntaxhighlight>
  end

Revision as of 02:48, 18 May 2006

Description

This function returns a boolean value (true / false) depending on whether the specified vehicle is locked.

Syntax

isVehicleLocked ( vehicle )

===Required Arguments===
*'''vehicle''': The vehicle that you need to obtain the locked status of.

==Example==
<syntaxhighlight lang="lua">newcar = createVehicle ( 520, 1024, 1024, 1024 )
if isVehicleLocked]] ( newcar )
  serverChat ( "Vehicle is locked." )
else
  serverChat ( "Vehicle is unlocked." )
 end