Scripting/Squirrel/Functions/SetHour: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
 
Line 10: Line 10:


== Example ==
== Example ==
 
<source lang=squirrel>
{{Scripting/Needs_Example}}
else if ( cmd == "sethour" )
 
{
if ( !text ) MessagePlayer( "Use /sethour <Hour>.", player );
else if ( !IsNum( text ) ) MessagePlayer( "Game hour must be an integer.", player );
else {
SetHour(text.tointeger())
MessagePlayer( "Game hour has been changed." , player );
}
}
</source>
=== Notes ===
=== Notes ===


== Related Functions ==
== Related Functions ==

Latest revision as of 08:45, 26 April 2019

This function will set the game hour.

Syntax

SetHour( hour )

Arguments

  • int hour - The hour of the game (from 00 to 23)

Example

else if ( cmd == "sethour" )
{
if ( !text ) MessagePlayer( "Use /sethour <Hour>.", player );
else if ( !IsNum( text ) ) MessagePlayer( "Game hour must be an integer.", player );
else {
SetHour(text.tointeger())
MessagePlayer( "Game hour has been changed." , player );
}
}

Notes

Related Functions