Raised This Month: $32 Target: $400
 8% 

sound command


Post New Thread Reply   
 
Thread Tools Display Modes
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
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-08-2012 , 14:35   Re: sound command
Reply With Quote #2

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

Last edited by EpicMonkey; 04-08-2012 at 14:35.
EpicMonkey is offline
INJAC
Member
Join Date: Sep 2011
Old 04-08-2012 , 16:01   Re: sound command
Reply With Quote #3

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?
INJAC is offline
Reply



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 17:54.


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