Squirrel/Server/Functions/Game/GetGamespeed
From Liberty Unleashed Wiki
(Difference between revisions)
(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
float GetGamespeed()
Arguments
- None
Example
This will return the current gamespeed in the server when somebody types '/serverspeed'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "serverspeed" ) { Message( id, "Current gamespeed in the server is: " + GetGamespeed() ); } }
Notes
The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.