[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 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++; } }
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 9,601 10-09-2013, 15:16
Last Post: [HARD] Tony.
  Help auto command Dynasty 6 5,976 08-26-2013, 16:05
Last Post: hillbilly
  Help Hide commands dhanin 5 5,471 03-28-2013, 00:11
Last Post: Dr3am95
  !come command Dr3am95 12 10,950 02-12-2013, 12:08
Last Post: SgtLegend
  whats the command to get string length pedjas 4 4,294 01-20-2013, 18:30
Last Post: pedjas
Question Help How do I host a Hide and Seek/Prop Hunt match? Narwhal900 2 5,243 01-04-2013, 01:27
Last Post: alvarogt95
  [Request] Hide and Seek (Mod/Plugin) JoSchaap 60 44,823 12-13-2012, 11:32
Last Post: aj021
  [Request] Team change by admin command. Dumas 10 11,375 11-29-2012, 21:38
Last Post: 99IRock
Question Help kick command still need help koro35 3 4,341 11-27-2012, 22:45
Last Post: koro35
  server command problem anedaktos 3 4,226 08-05-2012, 12:14
Last Post: hillbilly

Forum Jump:


Users browsing this thread:
1 Guest(s)

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