From 4566865a880a24da0998d544e45befe82aa225e3 Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 5 Apr 2021 02:37:17 +0200 Subject: [PATCH] try fix chat --- ReallifeGamemode.Client/index.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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;