Jump to content


Submitter

File Information

  • Submitted: Apr 30 2011 11:16 AM
  • Last Updated: Apr 30 2011 11:16 AM
  • File Size: 2.43KB
  • Views: 4951
  • Downloads: 388

Download Comenzi admin_ aka Adminmod 1.0

- - - - -



Un plugin foarte util ce va preceda toate comenziile cu amx_ in admin_ --- practic ne face serverul ca sa raspunda la admin_kick/admin_ban/admin_slay in loc de amx_ban/amx_slay/etc ...
Plugin construit de Razna @ Nebunie.Net


Sursa:

#include <amxmodx>
new cfg_prefix;
new sendmsg[33]

public plugin_init()
{
   register_plugin("CFG Prefix", "1.0", "razna")
   register_cvar("CFG Prefix", "1.0/razna", FCVAR_SERVER)
   cfg_prefix = register_cvar ( "amx_prefix", "admin_" );
}

public client_connect(id)
{
   sendmsg[id] = 0
}

public client_command(id)
{
   if(sendmsg[id])
   {
      return PLUGIN_CONTINUE
   }

   new cmd[225], temp[33], message[192], input_message[192], cfg_prefix2[51]


   get_pcvar_string(cfg_prefix,cfg_prefix2,50)
   

   new args = read_argc()
   read_args(input_message, 191)
   
   formatex(message, 191, "^"%s^"", input_message)
   
   remove_quotes(input_message)

   for(new i=0;i<=args;i++)
   {
      read_argv(i,temp,32)

      if(containi(temp, cfg_prefix2) != -1 )
      {
         replace(temp,32,cfg_prefix2,"amx_")
         add(cmd,224,temp)
      }
   }

   if(containi(cmd,"amx_") != -1)
   {
      sendmsg[id] = 1
      client_cmd(id,"^"%s^" ^"%s^"", cmd, input_message)
      sendmsg[id] = 0
      return PLUGIN_HANDLED
   }
   return PLUGIN_CONTINUE
}




Da nu merge si cu amx_ ? ci doar cu admin_ ? :-??
    • 0
  • Report
E facut sa mearga doar cu admin_. Ii poti modifica sursa sa raspunda la ambele :)
    • 0
  • Report

Other files you may be interested in ..





  • 59 Total Files
  • 19 Total Categories
  • 9 Total Authors
  • 86181 Total Downloads
  • Krond Functions Latest File
  • Salmus Latest Submitter

0 user(s) are online (in the past 15 minutes)

0 members, 0 guests, 0 anonymous users