onTimeChange

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

This event is called when the time changes.

Syntax

  1. function onTimeChange( int hour, int min )

Arguments

  • hour - Current hour
  • min - Current minute

Returns

This event does not handle return values.

Example

This example will notify players when the day changes.

  1.  
  2. function onTimeChange( hour, min )
  3. {
  4. if ( ( !hour ) && ( !min ) )
  5. {
  6. // It's midnight - 00:00
  7. Message( "The day has changed!" );
  8. }
  9. return 1;
  10. }
  11.  

Notes

The function Message was used in this example. More info about this in the corresponding page.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox