Squirrel/Server/Events/Game/onTimeChange

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|onTimeChange}} This event is called when the time changes. == Syntax == <code>function onTimeChange( int hour, int min )</code> === Arguments === * '''hour''…')
 
m
 
Line 34: Line 34:
 
=== Notes ===
 
=== Notes ===
  
The function [[Squirrel/Server/Functions/Messages/Message|Message]] was used in in this example. More info about this in the corresponding page.
+
The function [[Squirrel/Server/Functions/Messages/Message|Message]] was used in this example. More info about this in the corresponding page.
  
 
== Related Events ==
 
== Related Events ==
  
 
{{Squirrel/Server/Events/Game}}
 
{{Squirrel/Server/Events/Game}}

Latest revision as of 16:48, 8 November 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when the time changes.

[edit] Syntax

  1. function onTimeChange( int hour, int min )

[edit] Arguments

  • hour - Current hour
  • min - Current minute

[edit] Returns

This event does not handle return values.

[edit] 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.  

[edit] Notes

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

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox