Scripting/Squirrel/Functions/Game/SetTimerate
From VC-MP Wiki
Sets the current timerate in the server.
Syntax
bool SetTimeRate( int rate )
Arguments
- rate - The timerate to set
Example
After typing '/c timerate Integer', the timerate changes to faster/slower. If Integer = 0, the time will stop.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "timerate" ) { SetTimeRate( text.tointeger() ); } }
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
Related Functions
- GetHour
- SetHour
- GetMinute
- SetMinute
- SetTime
- GetTimeRate
- SetTimeRate
- GetWeather
- SetWeather
- GetWeatherRate
- SetWeatherRate
- GetWeatherLock
- SetWeatherLock
- SetAmmuWeapon
- IsAmmuWeaponEnabled
- SetAmmuWeaponEnabled
- CreateMarker
- CreateMarkerForPlayer
- GetWeaponSync
- SetWeaponSync
- GetGravity
- SetGravity
- GetGamespeed
- SetGamespeed
- GetWaterLevel
- SetWaterLevel
