View Single Post
ajpr
Junior Member
Join Date: Sep 2018
Old 03-18-2024 , 12:04   Re: Admin login/connect sound
Reply With Quote #17

Quote:
Originally Posted by hleV View Post
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.1", "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(0, "%s ^"%s^"", PlayCmd, g_AdminMusic);                   break;         } }
Hi everyone, the plugin is very good, but I found a problem, if there are three names listed in the plugin, and all three enter the server at the same time, the three songs play and generate a mixture of several sounds, the same happens if you change the map, I would like help to end this conflict of sounds.
ajpr is offline