Thread: sound message
View Single Post
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 01-16-2022 , 18:43   Re: sound message
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cromchat>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define ADMINACCESS    ADMIN_KICK

new const g_Sound[] = "misc/yoursound.wav";

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /ctc""Sound");
    
register_clcmd("say_team /ctc""Sound");
}

public 
plugin_precache() {    
    
precache_sound(g_Sound);
}

public 
Sound(id) {
    if(
is_user_access(id)) {
        
        new 
szName[32];
        
get_user_name(idszName31);
        
CC_SendMessage(0"&x01ADMIN: &x04%s &x03Joined the game &x01!"szName);
        
client_cmd(0"spk %s"g_Sound);
    }
    else {
        
CC_SendMessage(id"&x03You don't have access to this &x04command !");
    }
}
    
bool:is_user_access(id)
    return !!(
get_user_flags(id) & ADMINACCESS
__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>

Last edited by Yusochan; 01-16-2022 at 18:58.
Yusochan is offline