AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   sound command (https://forums.alliedmods.net/showthread.php?t=182320)

INJAC 04-08-2012 14:06

sound command
 
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

EpicMonkey 04-08-2012 14:35

Re: sound command
 
PHP Code:

client_cmd(id"mp3 play ^"%s^""soundfile

change id to 0 to play for everyone

PHP Code:

client_cmd(0"mp3 play ^"%s^""soundfile


INJAC 04-08-2012 16:01

Re: sound command
 
i did that and asked the players if they here it, they said no, and the song is a lot quiet then before, what can be the problem?


All times are GMT -4. The time now is 02:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.