View Single Post
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 04-16-2009 , 11:27   Re: Admin login/connect sound
Reply With Quote #11

Fixed that + some other thing.
Code:
#include <amxmodx>   #define FLAG_ADMIN ADMIN_LEVEL_A   new g_AdminNames[][] = {         "hleV",         "pur3",         "BAILOPAN" };   new g_AdminMusic[][] = {         "sound/mp3/hlev.mp3",         "sound/mp3/pur3.mp3",         "sound/wav/bailopan.wav" };   public plugin_precache()         for (new Sound = 0; Sound < sizeof(g_AdminMusic); Sound++)                 precache_generic(g_AdminMusic[Sound]);   public plugin_init()         register_plugin("Admin Connect Music", "1.2", "hleV");   public client_authorized(Cl) {         if (!(get_user_flags(Cl) & FLAG_ADMIN)) return;         new PlayCmd[9], Name[32];         get_user_name(Cl, Name, 31);           for (new Num = 0; Num < sizeof(g_AdminNames); Num++) if (equal(Name, g_AdminNames[Num]))         {                                 switch (g_AdminMusic[Num][strlen(g_AdminMusic[Num]) - 1])                 {                         case '3': PlayCmd = "mp3 play";                         case 'v': PlayCmd = "spk";                           default: break;                 }                   client_cmd(Cl, "%s ^"%s^"", PlayCmd, g_AdminMusic[Num]);                 client_cmd(0, "%s ^"%s^"", PlayCmd, g_AdminMusic[Num]);                   break;         } }
__________________
hleV is offline