diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 91d6b678..bd9d1d87 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -7,12 +7,18 @@ import { IGame } from './game'; import RageGame from './core/rage-mp/game'; -// Disables default RageMP Chat -mp.gui.chat.show(false); +(async () => { + await mp.game.waitAsync(2500); + // Disables default RageMP Chat + mp.gui.chat.show(false); -// Initialize chatbox CEF, mark it as default server chat -const chatbox = mp.browsers.new('package://assets/chat/index.html'); -chatbox.markAsChat(); + // Initialize chatbox CEF, mark it as default server chat + const chatbox = mp.browsers.new('package://assets/chat/index.html'); + + await mp.game.waitAsync(2500); + + chatbox.markAsChat(); +})(); var inMenu: boolean = false;