SetGarageOpen

From Multi Theft Auto: Wiki
Revision as of 08:24, 18 September 2008 by Erorr404 (talk | contribs) (New page: __NOTOC__ {{Server client function}} This function opens or closes the specified garage door in the world. ==Syntax== <syntaxhighlight lang="lua"> void setGarageOpen ( int garageID, bool open ) </code...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function opens or closes the specified garage door in the world.

Syntax

void setGarageOpen ( int garageID, bool open )

Required Arguments

  • garageID: The ID that represents the garage door being opened or closed.
  • isOpen: A boolean indicating whether or not to open the door.

Returns

This function does not return anything.

Example

Click to collapse [-]
Server

This example opens a garage door when a player enters a collision shape near it:

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()),
function (resource)

end
)

See Also

Template:World shape functions