Squirrel/Server/Functions/Game/GetGamespeed

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Updated with the latest functions)
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|GetGamespeed}}
 
This returns the current gamespeed setting in the server.
 
This returns the current gamespeed setting in the server.
  

Latest revision as of 10:43, 11 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This returns the current gamespeed setting in the server.

[edit] Syntax

  1. float GetGamespeed()

[edit] Arguments

  • None

[edit] Example

This will return the current gamespeed in the server when somebody types '/gamespeed'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "serverspeed" )
  5. {
  6. MessagePlayer( "Current gamespeed in the server is: " + GetGamespeed(), plr );
  7. }
  8. }
  9.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox