Scripting/Squirrel/Functions/SetTime

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

This function will set the game minute.

Syntax

SetTime( hour, minute )

Arguments

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

Example

function onPlayerCommand( player, cmd, text )
{
 if ( cmd == "settime" )
 {
  If ( !text ) MessagePlayer( "Format: /settime <hr> <min>"", player );
  else
  {
   local a = split(text, " ")
   if ( !IsNum( a[0] ) MessagePlayer( "Format: /settime <hr> <min>"", player );
   else if ( !IsNum( a[1] ) MessagePlayer( "Format: /settime <hr> <min>"", player );
   else SetTime( a[0], a[1] );
  }
 }
}

Notes

Related Functions