Squirrel/Server/Functions/Game/CloseSSVBridge
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ {{Squirrel/LUOnly}} This function closes the bridge leading to Shoreside Vale so that players can't drive across it. If the bridge is already moving or up nothing will happen. =...) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|CloseSSVBridge}} | |
{{Squirrel/LUOnly}} | {{Squirrel/LUOnly}} | ||
This function closes the bridge leading to Shoreside Vale so that players can't drive across it. If the bridge is already moving or up nothing will happen. | This function closes the bridge leading to Shoreside Vale so that players can't drive across it. If the bridge is already moving or up nothing will happen. | ||
Line 5: | Line 5: | ||
== Syntax == | == Syntax == | ||
− | <code>bool CloseSSVBridge( bool delayed )</code> | + | <code>bool CloseSSVBridge( [ bool delayed ] )</code> |
== Arguments == | == Arguments == | ||
− | * '''delayed''' If this is true, ring bridge bells for 10 seconds before lifting the bridge up. Otherwise lift the bridge immediately | + | * '''delayed''' If this optional argument is true, ring bridge bells for 10 seconds before lifting the bridge up. Otherwise lift the bridge immediately. By defaut the bridge will be lifted immediately |
== Example == | == Example == | ||
Line 23: | Line 23: | ||
CloseSSVBridge( true ); | CloseSSVBridge( true ); | ||
} | } | ||
+ | |||
+ | return 1; | ||
} | } | ||
</code> | </code> | ||
Line 28: | Line 30: | ||
=== Notes === | === Notes === | ||
− | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used | + | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in corresponding pages. |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Game}} | {{Squirrel/Server/Functions/Game}} |
Latest revision as of 03:22, 25 September 2010
This function closes the bridge leading to Shoreside Vale so that players can't drive across it. If the bridge is already moving or up nothing will happen.
[edit] Syntax
bool CloseSSVBridge( [ bool delayed ] )
[edit] Arguments
- delayed If this optional argument is true, ring bridge bells for 10 seconds before lifting the bridge up. Otherwise lift the bridge immediately. By defaut the bridge will be lifted immediately
[edit] Example
This command will close the Shoreside Vale bridge when someone types '/closessv'.
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "closessv" ) { MessagePlayer( "Closing Shoreside Vale Bridge", plr ); CloseSSVBridge( true ); } return 1; }
[edit] Notes
The function MessagePlayer and call onPlayerCommand were used in this example. More info about them in corresponding pages.
[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