Raised This Month: $ Target: $400
 0% 

emit_sound instead of client_cmd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 04-14-2018 , 09:39   emit_sound instead of client_cmd
Reply With Quote #1

Hello there,

Im using ultimate_sounds plugin which makes a sound while killing someone
so I have those sounds like

PHP Code:
new stksounds[31][] = 
{
    
"misc/killsounds/3multikill_f"
        
......

and then

PHP Code:
public play_sound(sound)
{
    
//new killer = read_data(1)
    
    
sound -=TASK_SOUND
    
//emit_sound( killer, CHAN_ITEM, stksounds[sound], VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
    
client_cmd(0"spk %s"stksounds[sound]); 
    
previous_level 0

as you can see I tried to use emit_sound instead of client_cmd since Im trying to play a sound but depending on the distance, so as close youre standing to that person who kills someone you can hear those sounds and if youre kinda far, you cant.

Ive seen similar plugins and there was something like that code above which is canceled.
How can I fix this?
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
 



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:47.


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