SetTime

From GTA Network Wiki
Jump to: navigation, search

SetTime
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

This function sets the world time. You can get this value with GetTime. If this is called on the server, it will set the time for every player. If this is called on the client, the time is only changed for that client.

Syntax

void NAPI.World.SetTime(int hours, int minutes, int seconds);

Required Arguments

  • hours: parameter input should be in int type.
  • minutes: parameter input should be in int type.
  • seconds: parameter input should be in int type.

Usage example

Set time to 23:15

NAPI.World.SetTime(23, 15, 0);

Changelog

Version Description
1.0 Release.

References