WaitForMainThread

From RAGE Multiplayer Wiki

Waits for the main thread before executing API related functions.


C# Syntax

Task<object>NAPI.Task.WaitForMainThread([long delayTime = 0]);

Parameters

  • delayTime: delay time in milliseconds until the action gets executed. Parameter input should be in long type

Example

NAPI.Task.WaitForMainThread();
NAPI.Chat.SendChatMessageToPlayer(player, "We are in main thread now.");