Thread Rating:
  • 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 7,162 10-09-2013, 15:16
Last Post: [HARD] Tony.
  Help auto command Dynasty 6 4,349 08-26-2013, 16:05
Last Post: hillbilly
  Help Hide commands dhanin 5 4,022 03-28-2013, 00:11
Last Post: Dr3am95
  !come command Dr3am95 12 7,841 02-12-2013, 12:08
Last Post: SgtLegend
  whats the command to get string length pedjas 4 3,088 01-20-2013, 18:30
Last Post: pedjas
Question Help How do I host a Hide and Seek/Prop Hunt match? Narwhal900 2 3,983 01-04-2013, 01:27
Last Post: alvarogt95
  [Request] Hide and Seek (Mod/Plugin) JoSchaap 60 33,842 12-13-2012, 11:32
Last Post: aj021
  [Request] Team change by admin command. Dumas 10 8,877 11-29-2012, 21:38
Last Post: 99IRock
Question Help kick command still need help koro35 3 3,295 11-27-2012, 22:45
Last Post: koro35
  server command problem anedaktos 3 3,086 08-05-2012, 12:14
Last Post: hillbilly

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.