forked from altmp/coreclr-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAltChat.cs
32 lines (26 loc) · 948 Bytes
/
AltChat.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections.Generic;
using AltV.Net.Elements.Entities;
namespace AltV.Net.Resources.Chat.Api
{
public static class AltChat
{
//internal static Chat Chat;
internal static readonly HashSet<CommandDoesNotExistsDelegate> CommandDoesNotExistsDelegates =
new HashSet<CommandDoesNotExistsDelegate>();
public delegate void CommandDoesNotExistsDelegate(IPlayer player, string command);
public static event CommandDoesNotExistsDelegate OnCommandDoesNotExists
{
add => CommandDoesNotExistsDelegates.Add(value);
remove => CommandDoesNotExistsDelegates.Remove(value);
}
public static void SendBroadcast(string message)
{
//Chat.Broadcast(message);
Alt.EmitAllClients("chat:message", null, message);
}
/*internal static void Init(Chat chat)
{
Chat = chat;
}*/
}
}