GetTime: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Gets the current time in the world. ==Syntax== {{#tag:pre|TimeSpan {{Template:CSharp_Serverside_namespace}}World.GetTime();}} ==Example== {{CSharpContainer| {{Example}} {{#t...")
 
No edit summary
 
Line 1: Line 1:
Gets the current time in the world.
Gets the current time in the world.


==Syntax==
{{CSharpContainer|
{{#tag:pre|TimeSpan {{Template:CSharp_Serverside_namespace}}World.GetTime();}}
{{#tag:pre|TimeSpan {{Template:CSharp_Serverside_namespace}}World.GetTime();}}
==Example==
{{CSharpContainer|
{{Example}}
{{Example}}
{{#tag:syntaxhighlight|
{{#tag:syntaxhighlight|

Latest revision as of 20:55, 27 November 2019

Gets the current time in the world.


C# Syntax

TimeSpan NAPI.World.GetTime();

Example

[Command("gettime")]
public void GetTimeCommand(Client sender)
{
    sender.sendChatMessage("Time: " + NAPI.World.GetTime().ToString());
}