• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Help] How to hide a command?
#1
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 MessageServerClient Client)
        {
            try
            {
                if (
Message.StartsWith("!admin"))
                {
                    
string str "";
                    List<
ServerClientclients 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++;
                            }
                        } 
  Reply
#2
Code:
if(message == "!admin")
{


// END HERE
return ChatType.ChatReturn; // or ChatNone
}
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
  Reply
#3
Does not work, switches off completely all chat
  Reply
#4
Also you should add return chatype in catch.
Strange, it should work.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
  Reply
#5
Thanks, all works!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  MW3 Hide WEAPONS [HARD] Tony. 7 6,685 10-09-2013, 15:16
Last Post: [HARD] Tony.
  Help auto command Dynasty 6 3,996 08-26-2013, 16:05
Last Post: hillbilly
  Help Hide commands dhanin 5 3,651 03-28-2013, 00:11
Last Post: Dr3am95
  !come command Dr3am95 12 6,999 02-12-2013, 12:08
Last Post: SgtLegend
  whats the command to get string length pedjas 4 2,818 01-20-2013, 18:30
Last Post: pedjas
Question Help How do I host a Hide and Seek/Prop Hunt match? Narwhal900 2 3,735 01-04-2013, 01:27
Last Post: alvarogt95
  [Request] Hide and Seek (Mod/Plugin) JoSchaap 60 31,127 12-13-2012, 11:32
Last Post: aj021
  [Request] Team change by admin command. Dumas 10 8,281 11-29-2012, 21:38
Last Post: 99IRock
Question Help kick command still need help koro35 3 3,043 11-27-2012, 22:45
Last Post: koro35
  server command problem anedaktos 3 2,811 08-05-2012, 12:14
Last Post: hillbilly

Forum Jump:


Users browsing this thread: 1 Guest(s)