Squirrel/Server/Functions/Game/GetGamespeed

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This returns the current gamespeed setting in the server. == Syntax == <code>float GetGamespeed()</code> == Arguments == * '''None''' == Example == This will return the cur...)

Revision as of 15:53, 17 October 2008

This returns the current gamespeed setting in the server.

Syntax

  1. float GetGamespeed()

Arguments

  • None

Example

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

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

Notes

The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.

Related Functions

Template:Squirrel/Functions/Game

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox