forked from JaredScar/DiscordChatRoles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.lua
21 lines (20 loc) · 790 Bytes
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
------------------------------------
--- Discord Chat Roles by Badger ---
------------------------------------
RegisterNetEvent('Permissions:CheckPermsClient')
AddEventHandler('Permissions:CheckPermsClient', function(msg)
if staffchatActive then
TriggerServerEvent('DiscordChatRoles:CheckPerms', msg)
end
end)
staffchatActive = true
RegisterNetEvent('DiscordChatRoles:StaffChat:Toggle')
AddEventHandler('DiscordChatRoles:StaffChat:Toggle', function()
if staffchatActive then
staffchatActive = false
TriggerEvent('chatMessage', '', {255, 255, 255}, '^7[^1StaffChat^7] ^5StaffChat messages are now ^1DISABLED')
else
staffchatActive = true
TriggerEvent('chatMessage', '', {255, 255, 255}, '^7[^1StaffChat^7] ^5StaffChat messages are now ^2ENABLED')
end
end)