Заказать Сервер Заказать Плагин Контакты Поиск

[ вход ]
[ последние сообщения ]

  • Страница 4 из 4
  • «
  • 1
  • 2
  • 3
  • 4
Форум » SourceMod - Counter Strike Source && CS GO » Обсуждение » how to block "sm plugins" console commands in css v34? (how to block "sm plugins" console commands in css v34?)
how to block "sm plugins" console commands in css v34?
Nail Дата: Пятница, 12.01.2018, 08:27:49 | Сообщение # 46
Сообщений: 38
Репутация: 8 [ +/- ]
Are You sure that You still can see a list of plugins via "sm plugins" ? That is what the question of the topic is all about, isn't it?
 
AdabraIM Дата: Пятница, 12.01.2018, 09:14:36 | Сообщение # 47
Сообщений: 30
Репутация: 0 [ +/- ]
The answer to your questions is yes!
But there is a quiet important issue here...
Now I can’t use main commands such as sm_cvar or sm_rcon ... I just want to know if I can block list of plugins while being able to use “sm” command!
Sorry for so much questions and time wasting but I want to make it with no problems!...
Thanks for your wonderful helps!!!
 
_wS_ Дата: Пятница, 12.01.2018, 10:58:43 | Сообщение # 48
sourcemod/core/logic/PluginSys.cpp

Код
void CPluginManager::OnRootConsoleCommand(const char *cmdname, const ICommandArgs *command)
{
   int argcount = command->ArgC();
   if (argcount >= 3)
   {
      const char *cmd = command->Arg(2);
      if (strcmp(cmd, "list") == 0)
      {
         return; // just write "return" here and "sm plugins list" disabled (i think) (or i misunderstood your problem)
         char buffer[256];
         ...
 
AdabraIM Дата: Пятница, 12.01.2018, 12:12:22 | Сообщение # 49
Сообщений: 30
Репутация: 0 [ +/- ]
Yes It is what I want... But after doing what you have said again the “sm” command is blocked .
 
_wS_ Дата: Пятница, 12.01.2018, 12:26:24 | Сообщение # 50
You did something wrong or did not replace the files after compilation.
Standart code:

Код
if (strcmp(cmd, "list") == 0)
{
   char buffer[256];
   unsigned int id = 1;
   int plnum = GetPluginCount();

   if (!plnum)
   {
      rootmenu->ConsolePrint("[SM] No plugins loaded");
      return; // you see, it work - "return" = stop function
   }


Or do this idk:

Код
if (plnum || !plnum)
{
   rootmenu->ConsolePrint("[SM] No plugins loaded");
   return;
}


Perhaps you blocked the command "sm" in some other file.
 
_wS_ Дата: Пятница, 12.01.2018, 12:28:31 | Сообщение # 51
Цитата AdabraIM ()
Do I have to delete the rest of the block??

No, just do this

Код
if (plnum || !plnum)
{
   rootmenu->ConsolePrint("[SM] No plugins loaded");
   return;
}


Don't touch other code.
 
AdabraIM Дата: Пятница, 12.01.2018, 12:29:40 | Сообщение # 52
Сообщений: 30
Репутация: 0 [ +/- ]
Sorry I deleted my text by mistake:
The questiin was : Do I have to delete the rest of the block?(however the answer is upper!)
 
chilla_mytku Дата: Пятница, 19.01.2018, 23:49:16 | Сообщение # 53
Сообщений: 70
Репутация: 0 [ +/- ]
 
_wS_ Дата: Суббота, 20.01.2018, 00:21:53 | Сообщение # 54
Он не для v34.
 
Форум » SourceMod - Counter Strike Source && CS GO » Обсуждение » how to block "sm plugins" console commands in css v34? (how to block "sm plugins" console commands in css v34?)
  • Страница 4 из 4
  • «
  • 1
  • 2
  • 3
  • 4
Поиск: