
   /* AMX Mod script.
   *
   * (c) Copyright 2002-2003, f117bomb
   * This file is provided as is (no warranties).
   */
   #include <amxmod>
   #include <amxmisc>
   /*
   * Usage: amx_spray <authid, nick, @team or #userid>
   * Examples:
   * amx_amx_spray @CT 1             - Sprays Counter-Terrorists logos
   *
   */
   public admin_spray(id,level,cid) {
       if (!cmd_access(id,level,cid,2))
           return PLUGIN_HANDLED
       new arg[32], name2[32]
       read_argv(1,arg,31)
       get_user_name(id,name2,31)
       if (arg[0]=='@'){
           new players[32], inum
           get_players(players,inum,"ae",arg[1])
           if (inum==0){
               console_print(id,"No clients in such team")
               return PLUGIN_HANDLED
           }
           for(new a=0;a<inum;++a) {
               client_cmd(players[a],"impulse 201")
           }
           switch(get_cvar_num("amx_show_activity"))    {
                     case    2:    client_print(0,print_chat,"ADMIN   %s:
   sprayed logo of all %s",name2,arg[1])
                     case 1:    client_print(0,print_chat,"ADMIN: sprayed
   logo of all %s",arg[1])
                }
           console_print(id,"All clients have sprayed their logos")
       }
       else {
           new player = cmd_target(id,arg,7)
           if (!player) return PLUGIN_HANDLED
           client_cmd(player,"impulse 201")
           new name[32]
           get_user_name(player,name,31)
           switch(get_cvar_num("amx_show_activity"))    {
                     case    2:    client_print(0,print_chat,"ADMIN   %s:
   sprayed logo of %s",name2,name)
                     case 1:    client_print(0,print_chat,"ADMIN: sprayed
   logo of %s",name)
                }
           console_print(id,"Client ^"%s^" has sprayed his logo",name)
       }
       return PLUGIN_HANDLED
   }
   public plugin_init() {
       register_plugin("Admin Spray","0.9.3","f117bomb")
       register_concmd("amx_spray","admin_spray",ADMIN_LEVEL_A,"<authid,
   nick, @team or #userid>")
       return PLUGIN_CONTINUE
   }
