-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFunCustomConsoleMode.cs
More file actions
36 lines (31 loc) · 1011 Bytes
/
FunCustomConsoleMode.cs
File metadata and controls
36 lines (31 loc) · 1011 Bytes
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
33
34
35
36
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core.Translations;
namespace FunMatchPlugin;
public class FunCustomConsoleMode : FunBaseClass
{
public string DecriptionCustom;
private string CFGLoadFile;
private string CFGUnLoadFile;
public override string Decription => "Custom Modes";
public FunCustomConsoleMode(string decr,string loadFile, string unLoadFile)
{
DecriptionCustom = decr;
CFGLoadFile = loadFile;
CFGUnLoadFile = unLoadFile;
}
public override void EndFun(FunMatchPlugin plugin)
{
Enabled = false;
Server.ExecuteCommand("exec " + CFGUnLoadFile);
}
public override void Fun(FunMatchPlugin plugin)
{
if (Enabled == true) return;
Enabled = true;
Server.ExecuteCommand("exec " + CFGLoadFile);
}
public override void DisPlayHelp()
{
Server.PrintToChatAll(StringExtensions.ReplaceColorTags("{RED}") + "[FunMatchPlugin] " + DecriptionCustom);
}
}