From a271438aca3807516afe6ffd11d6058de82b1395 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Thu, 25 Jan 2024 11:01:54 +0100 Subject: [PATCH] use MP.IsPlayerGuest --- main.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.lua b/main.lua index e4c4cba..c2a441d 100644 --- a/main.lua +++ b/main.lua @@ -98,17 +98,10 @@ end print('LOADED!!!!') function onChatMessage(id, name, message) - local isGuest = true + local isGuest = MP.IsPlayerGuest(id) local identifiers = MP.GetPlayerIdentifiers(id) if not allowGuestChat then - for TYPE, ID in pairs(identifiers) do - print(TYPE) - if TYPE == 'beammp' then - isGuest = false - end - end - if isGuest and not allowGuestChat then MP.SendChatMessage(id, '^4Sorry Chat for Guest Accounts is Disabled on this server.') return 1