Raised This Month: $38 Target: $400
 9% 

[req] Admin connect HUD + Sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frenetico9
Junior Member
Join Date: Feb 2021
Old 02-13-2021 , 23:12   [req] Admin connect HUD + Sound
Reply With Quote #1

I wanted help to make it work with more than 2 players with different sounds.

PHP Code:
#include < amxmodx >
#include < amxmisc > 

#define PLUGIN "Entrada Admin HUD + Sound"
#define VERSION "1.0"
#define AUTHOR "Not.Exactly" 

public plugin_init( ) 
{  
    
register_pluginPLUGINVERSIONAUTHOR );

 
public 
plugin_precache( ) 
    
precache_sound("misc/MD.wav")

public 
client_putinserver(id
    
set_task0.3"My_Function"id )

public 
My_Functionid )
{
    if(
get_user_flags(id) & ADMIN_LEVEL_G)
    {  
        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
   
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(0"El dueno %s Entro al servidor!"name);
        
client_cmd(0"spk misc/MD");
  
  
    }
    else if(
get_user_flags(id) & ADMIN_LEVEL_H)
    { 
        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
  
        
set_hudmessage(002550.300.4006.012.0);
        
show_hudmessage(0"The Admin %s Entro al Servidor!"name);
    }


Last edited by frenetico9; 02-13-2021 at 23:21.
frenetico9 is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 02-14-2021 , 04:45   Re: [req] Admin connect HUD + Sound
Reply With Quote #2

PHP Code:
#include < amxmodx >
#include < amxmisc > 

#define PLUGIN "Entrada Admin HUD + Sound"
#define VERSION "1.0"
#define AUTHOR "Not.Exactly" 

public plugin_init( ) 
{  
    
register_pluginPLUGINVERSIONAUTHOR );

 
public 
plugin_precache( )

    
precache_sound("misc/MD.wav")
    
precache_sound("misc/sound2.wav"//File location you can change it if you want
    
precache_sound("misc/sound3.wav")
    
precache_sound("misc/sound2.wav")
}

public 
client_putinserver(id
    
set_task0.3"My_Function"id )

public 
My_Functionid )
{
    if(
get_user_flags(id) & ADMIN_LEVEL_G)
    {  
        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
   
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(0"El dueno %s Entro al servidor!"name);
        
client_cmd(0"spk misc/MD");
  
  
    }
    else if(
get_user_flags(id) & ADMIN_LEVEL_H)
    { 
        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
  
        
set_hudmessage(002550.300.4006.012.0);
        
show_hudmessage(0"The Admin %s Entro al Servidor!"name);
        
client_cmd(0"spk sound2");    
    }
    else if(
get_user_flags(id) & ADMIN_IMMUNITY//player 3 you can change the flags
    

        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
  
        
set_hudmessage(002550.300.4006.012.0);
        
show_hudmessage(0"The Admin %s Entro al Servidor!"name);
        
client_cmd(0"spk sound3");    
    }
    else if(
get_user_flags(id) & ADMIN_LEVEL_A//player 4 you can add more player
    

        new 
name[32];
        
get_user_name(idnamesizeof name 1);
  
  
        
set_hudmessage(002550.300.4006.012.0);
        
show_hudmessage(0"The Admin %s Entro al Servidor!"name);
        
client_cmd(0"spk sound4");    
    }      

Theodore Bagwell is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:15.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode