Squirrel/Server/Functions/Game/CloseSSVBridge

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(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:
__NOTOC__
+
{{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 in in this example. More info about them in corresponding pages.
+
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

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
LU This function works in Liberty Unleashed only.

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

  1. 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'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "closessv" )
  5. {
  6. MessagePlayer( "Closing Shoreside Vale Bridge", plr );
  7. CloseSSVBridge( true );
  8. }
  9. return 1;
  10. }
  11.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox