Squirrel/Server/Functions/Game/IsSSVBridgeUp

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ {{Squirrel/LUOnly}} This function returns whether the lift bridge leading to Shoreside Vale is up or down. == Syntax == <code>bool IsSSVBridgeUp()</code> == Arguments == * ''...)
 
m
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{Squirrel/LUOnly}}
 
{{Squirrel/LUOnly}}
This function returns whether the lift bridge leading to Shoreside Vale is up or down.
+
This function returns whether the lift bridge leading to Shoreside Vale is up (going up) or down (going down).
  
 
== Syntax ==
 
== Syntax ==
Line 13: Line 13:
 
== Example ==
 
== Example ==
  
This command will tell the player whether the SSV bridge has been locked when they type '/bridgelock'.
+
This command will tell the player the status of the SSV bridge when they type '/bridge'.
  
 
<code lang="squirrel">
 
<code lang="squirrel">
 
function onPlayerCommand( plr, cmd, text )
 
function onPlayerCommand( plr, cmd, text )
 
{
 
{
     if ( cmd == "bridgelock" )
+
     if ( cmd == "bridge" )
 
     {
 
     {
 
           if ( IsSSVBridgeUp() ) MessagePlayer( "Shoreside Vale bridge is currently up.", plr );
 
           if ( IsSSVBridgeUp() ) MessagePlayer( "Shoreside Vale bridge is currently up.", plr );

Revision as of 09:52, 28 November 2009

LU This function works in Liberty Unleashed only.

This function returns whether the lift bridge leading to Shoreside Vale is up (going up) or down (going down).

Syntax

  1. bool IsSSVBridgeUp()

Arguments

  • none

Example

This command will tell the player the status of the SSV bridge when they type '/bridge'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "bridge" )
  5. {
  6. if ( IsSSVBridgeUp() ) MessagePlayer( "Shoreside Vale bridge is currently up.", plr );
  7. else MessagePlayer( "Shoreside Vale bridge is currently open.", plr );
  8. }
  9. }
  10.  

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox