Scripting/Squirrel/Functions/Game/SetTime
From VC-MP Wiki
This function changes the server time.
Syntax
bool SetTime( int hour, int min )
Arguments
- hour - Hours
- min - Minutes
Example
This command will set the time to 0:00 when someone types '/c midnight'.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "midnight" ) { SetTime( 0, 0 ); } }
Notes
The call onPlayerCommand was also used in the 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
