Squirrel/Server/Functions/Game/SetGamespeed
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Sets the gamespeed in the server. This affects all players. == Syntax == <code>bool SetGamespeed( float fSpeed )</code> == Arguments == * '''fSpeed''' - The value that you wa...) |
Revision as of 15:56, 17 October 2008
Sets the gamespeed in the server. This affects all players.
Syntax
bool SetGamespeed( float fSpeed )
Arguments
- fSpeed - The value that you want to set the gamespeed to
Example
This will set the Gamespeed when a player types '/speed 0.5'
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "speed" ) { SetGamespeed( text.tofloat() ); } }
Notes
The call OnPlayerCommand was used in this example. More info about this in its corresponding page.