Hey guys,
i made new plugin, which switches hud on !hud command without 0 or 1.
Source code:
Someone test it.
Download:
hudpluh.rar (Size: 1.94 KB / Downloads: 109)
i made new plugin, which switches hud on !hud command without 0 or 1.
Source code:
Code:
using Addon;
using System.Collections.Generic;
namespace plugin_test
{
public class plugin_test : CPlugin
{
public bool hud_enabled = true;
public override void OnServerLoad()
{
ServerPrint("\n Hud Switcher plugin loaded. \n Creator: x7'se7en");
}
public override ChatType OnSay(string Message, ServerClient Client)
{
if (Message.StartsWith("!hud"))
{
if (hud_enabled)
{
SetClientDvar(Client.ClientNum, "g_hardcore \"0\"");
TellClient(Client.ClientNum, "^3HUD Disabled.", true);
disable2();
}
else
{
SetClientDvar(Client.ClientNum, "g_hardcore \"1\"");
TellClient(Client.ClientNum, "^3HUD Enabled.", true);
enable2();
}
}
return ChatType.ChatContinue;
}
public void disable2()
{
hud_enabled = false;
}
public void enable2()
{
hud_enabled = true;
}
}
}
Someone test it.
Download:
hudpluh.rar (Size: 1.94 KB / Downloads: 109)