Scripting/Squirrel/Functions/SetTime

From Vice City Multiplayer
Revision as of 21:50, 30 January 2017 by Thijn (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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