How to hide a command in chat !admin?
PHP Code:
using Addon;
using System;
using System.Collections;
using System.Collections.Generic;
public class ShowAdmins : CPlugin
{
private ArrayList Admins_Xuids = new ArrayList();
public override ChatType OnSay(string Message, ServerClient Client)
{
try
{
if (Message.StartsWith("!admin"))
{
string str = "";
List<ServerClient> clients = base.GetClients();
if (clients != null)
{
bool flag = true;
int num = 0;
foreach (ServerClient client in clients)
{
if (this.Admins_Xuids.Contains(client.XUID))
{
if (flag)
{
str = str + client.Name;
flag = false;
}
else
{
str = str + ", " + client.Name;
}
num++;
}
}