Thread: sound command
View Single Post
Author Message
INJAC
Member
Join Date: Sep 2011
Old 04-08-2012 , 14:06   sound command
Reply With Quote #1

I have this plugin
PHP Code:
#include <amxmodx> 

new soundfile[] = "sound/hoss.mp3" 

public plugin_init() {  
              
    
register_plugin("pesma""0.1""OvidiuS")  
              
    
register_clcmd("say /hoss""pusti_muz")
    
register_clcmd("say_team /hoss""pusti_muz"
    
register_clcmd("say /stop""stop_muz"


public 
plugin_precache() 
    
precache_generic(soundfile

public 
pusti_muz(id)  

    if(!(
get_user_flags(id) & ADMIN_LEVEL_H)) { 
        
client_print(idprint_center"Ta komanda je samo za head admine"
        return 
PLUGIN_HANDLED 
    

    else { 
        
client_cmd(id"mp3 play ^"%s^""soundfile)  
    } 
    return 
PLUGIN_HANDLED

public 
stop_muzid 

client_cmdid"mp3 stop" 
return 
PLUGIN_HANDLED 

i got it from my hosting and when i enter the command i am only one who can here it
how can i make so the other players can also here it when i type the command? Thanks in advance
INJAC is offline