Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SystemChatChannel.c
Go to the documentation of this file.
2{
3 //------------------------------------------------------------------------------------------------
4 override bool ProcessMessage(BaseChatComponent sender, string message, bool isAuthority)
5 {
6 if (isAuthority && message.StartsWith("!shutdown"))
7 {
8 Print("Commencing server shutdown via chat command.");
9 GetGame().RequestClose();
10 }
11
12 return true;
13 }
14
15 //------------------------------------------------------------------------------------------------
16 override bool IsDelivering(BaseChatComponent sender, BaseChatComponent receiver)
17 {
18 return true;
19 }
20
21
22 //------------------------------------------------------------------------------------------------
23 override bool IsAvailable(BaseChatComponent sender)
24 {
25
26 SCR_PlayerController senderPC =SCR_PlayerController.Cast(sender.GetOwner());
27 if (!senderPC)
28 return false;
29
30 if (RplSession.Mode() == RplMode.Client)
31 {
32 return false;
33 }
34
35 else
36 {
37 return true;
38 }
39
40 }
41};
ArmaReforgerScripted GetGame()
Definition game.c:1398
RplMode
Mode of replication.
Definition RplMode.c:9
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.