mirror of
https://github.com/BeamMP/BeamBase.git
synced 2025-07-01 23:35:25 +00:00
use MP.IsPlayerGuest
This commit is contained in:
parent
c4c7fb88f1
commit
a271438aca
9
main.lua
9
main.lua
@ -98,17 +98,10 @@ end
|
|||||||
print('LOADED!!!!')
|
print('LOADED!!!!')
|
||||||
|
|
||||||
function onChatMessage(id, name, message)
|
function onChatMessage(id, name, message)
|
||||||
local isGuest = true
|
local isGuest = MP.IsPlayerGuest(id)
|
||||||
local identifiers = MP.GetPlayerIdentifiers(id)
|
local identifiers = MP.GetPlayerIdentifiers(id)
|
||||||
|
|
||||||
if not allowGuestChat then
|
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
|
if isGuest and not allowGuestChat then
|
||||||
MP.SendChatMessage(id, '^4Sorry Chat for Guest Accounts is Disabled on this server.')
|
MP.SendChatMessage(id, '^4Sorry Chat for Guest Accounts is Disabled on this server.')
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user