Raised This Month: $ Target: $400
 0% 

how to play a sound so everyone hear?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-08-2009 , 04:01   Re: how to play a sound so everyone hear?
Reply With Quote #2

Something like this:
PHP Code:
#include <amxmodx>

new g_screamsound[] = {"misc/scream_dir/scream"}
new 
g_max_players

public plugin_init(){
    
g_max_players get_maxplayers()
    
register_clcmd("scream""play_it"ADMIN_KICK)
}


public 
plugin_precache(){
    
precache_sound(g_screamsound)
}


public 
play_it(id){
    for(new 
i=1i<=g_max_playersi++)
        if(
is_user_connected(i))
            
client_cmd(i"spk %s"g_screamsound)
    return 
PLUGIN_HANDLED

__________________
Impossible is Nothing
Sylwester is offline
 



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 23:34.


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