Scripting/Squirrel/Functions/SetMinute: 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
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:


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


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


{{Scripting/Squirrel/Functions/Server_Settings}}
{{Scripting/Squirrel/Functions/Server_Settings}}
[[Category:Scripting/Squirrel/Functions/Server_Settings _Functions]]

Latest revision as of 08:41, 26 April 2019

This function sets the game minutes.

Syntax

SetMinute( minute )

Arguments

  • int minute - The minute of the game (from 00 to 59)

Example

else if ( cmd == "setmin" )
{
if ( !text ) MessagePlayer( "Use /setmin <Minutes>.", player );
else if ( !IsNum( text ) ) MessagePlayer( "Game minutes must be an integer.", player );
else {
SetMinute(text.tointeger())
MessagePlayer( "Game minutes has been changed." , player );
}
}

Notes

Related Functions