Squirrel/Server/Functions/Game/OpenGarage
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|OpenGarage}} This function opens the given garage door. List of garage IDs can be found from here. == Syntax == <code>boo…') |
|||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | + | This will open the Portland hideout garage when the player types /opensesame | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerCommand( pPlayer, szCommand, szText ) | |
+ | { | ||
+ | if ( szCommand == "opensesame" ) | ||
+ | { | ||
+ | OpenGarage( PORTLAND_HIDEOUT_GARAGE ); | ||
+ | } | ||
+ | |||
+ | return 1; | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in this example. More info about this in the corresponding page. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Game}} | {{Squirrel/Server/Functions/Game}} |
Latest revision as of 23:44, 19 October 2010
This function opens the given garage door. List of garage IDs can be found from here.
[edit] Syntax
bool OpenGarage( int garage )
[edit] Arguments
- garage - This is the ID of the garage you want to open. List of garage IDs can be found from here
[edit] Example
This will open the Portland hideout garage when the player types /opensesame
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "opensesame" ) { OpenGarage( PORTLAND_HIDEOUT_GARAGE ); } return 1; }
[edit] Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.
[edit] Related Functions
- CloseGarage
- CloseSSVBridge
- EnableTrains
- GetBoundariesLower
- GetBoundariesUpper
- GetFriendlyFire
- GetGamespeed
- GetGravity
- GetHour
- GetIslands
- GetMinute
- GetSSVBridgeLock
- GetSSVBridgeUpdateTime
- GetSurfaceTraction
- GetTimeLock
- GetWeather
- GetWeatherLock
- IsSSVBridgeUp
- OpenGarage
- OpenSSVBridge
- SetBoundaries
- SetFriendlyFire
- SetGamespeed
- SetGravity
- SetIslands
- SetSSVBridgeLock
- SetSSVBridgeUpdateTime
- SetSurfaceTraction
- SetTime
- SetTimeLock
- SetWeather
- SetWeatherLock