SetTime

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Changes the server world time. This affects all players.

Syntax

  1. bool SetTime( int hour, int min )

Arguments

  • hour - The number of hours you want to change the server time to
  • min - The number of minutes you want to change the server time to

Example

This command will change the server time to 12:00 when somebody types '/settime 12 00'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "settime" )
  5. {
  6. local aTime = split( text, " " );
  7. local szHour = aTime[0], szMin = aTime[1];
  8. SetTime( szHour.tointeger(), szMin.tointeger() );
  9. }
  10. }
  11.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox