View Single Post
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-31-2015 , 14:39   Re: How to play sound on command [CS:GO]
Reply With Quote #16

Quote:
Originally Posted by Jcrr View Post
I arledy got this:
PHP Code:
public OnMapStart()
{
    
AddFileToDownloadsTable("sound/realmod/heal.wav");
    
AddFileToDownloadsTable("sound/realmod/buy.wav");
    
PrecacheSound("sound/realmod/heal.wav");
    
PrecacheSound("sound/realmod/buy.wav");

Sound callout:
PHP Code:
EmitSoundToClient(client"sound/realmod/buy.wav");  
EmitSoundToClient(client"sound/realmod/heal.wav"); 
And it gives me that error:
PHP Code:
[SoundS_StartSound(): Failed to load sound 'sound\realmod\heal.wav'File is missing from disk/repository.
[
SoundS_StartSound(): Failed to load sound 'sound\realmod\buy.wav'File is missing from disk/repository
Files are succesful downloaded from server, and they are present in dir:
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\sound\realmod
In precache you must remove folder name, in precache you need only file name.
And on emit sound only file name,
__________________
SourcePawn, C# and C++ Programmer.

My plugin list

Last edited by TheUnderTaker; 07-31-2015 at 14:39.
TheUnderTaker is offline