Raised This Month: $ Target: $400
 0% 

[SOLVED But not sounds] Sounds and Show particles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-16-2015 , 03:58   [SOLVED But not sounds] Sounds and Show particles
Reply With Quote #1

Hi i'm trying to add for command that when you perform it it will play a sound for all, I tried a lot of thing and didn't succeed can someone tell me how?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 07-16-2015 , 04:17   Re: Sounds
Reply With Quote #2

What game, can we see what you DID try?
headline is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-16-2015 , 04:23   Re: Sounds
Reply With Quote #3

Quote:
Originally Posted by Headline22 View Post
What game, can we see what you DID try?
Team Fortress 2, I tried
PHP Code:
public OnMapStart()
{
 
AddFileToDownloadsTable("sounds/sound1.mp3");
    
PrecacheSound("sounds/sound1.mp3");
}
 
public 
Action:Command_Something(clientargs)
{
EmitSoundToAll("sounds/sound1.mp3");

And more...
I just need to know how to play this sounds..
Btw I tried ServerCommand("sm_play @all sounds/sound1.mp3") And it didn't work
__________________
SourcePawn, C# and C++ Programmer.

My plugin list

Last edited by TheUnderTaker; 07-16-2015 at 04:23.
TheUnderTaker is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 07-16-2015 , 06:12   Re: Sounds
Reply With Quote #4

Quote:
Originally Posted by TheUnderTaker View Post
Team Fortress 2, I tried
PHP Code:
public OnMapStart()
{
 
AddFileToDownloadsTable("sounds/sound1.mp3");
    
PrecacheSound("sounds/sound1.mp3");
}
 
public 
Action:Command_Something(clientargs)
{
EmitSoundToAll("sounds/sound1.mp3");

And more...
I just need to know how to play this sounds..
Btw I tried ServerCommand("sm_play @all sounds/sound1.mp3") And it didn't work
The sound nee to be in both side server and client else you will heard nothing when you use sm_play
__________________
Benoist3012 is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-16-2015 , 06:15   Re: Sounds
Reply With Quote #5

Quote:
Originally Posted by Benoist3012 View Post
The sound nee to be in both side server and client else you will heard nothing when you use sm_play
Guys, Can you just please tell me how to play sound when I perform a command?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 07-16-2015 , 06:53   Re: Sounds
Reply With Quote #6

Open console type sm_play @all pathsound
__________________
Benoist3012 is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-16-2015 , 07:21   Re: Sounds
Reply With Quote #7

Quote:
Originally Posted by Benoist3012 View Post
Open console type sm_play @all pathsound
I want in the .sp file add the command sound...
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
Akuba
Senior Member
Join Date: Oct 2013
Old 07-16-2015 , 07:38   Re: Sounds
Reply With Quote #8

You do not need "sound/" on PrecacheSound and EmitSoundToAll. Only on AddFilesToDownloadsTable.

Last edited by Akuba; 07-16-2015 at 07:39.
Akuba is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 07-16-2015 , 07:58   Re: Sounds
Reply With Quote #9

Quote:
Originally Posted by Akuba View Post
You do not need "sound/" on PrecacheSound and EmitSoundToAll. Only on AddFilesToDownloadsTable.
Can I code for example? I don't know how to use it...
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 07-16-2015 , 11:04   Re: Sounds
Reply With Quote #10

PHP Code:
public OnMapStart()
{
    
AddFileToDownloadsTable("sounds/sound1.mp3");
    
PrecacheSound("sound1.mp3");
}
 
public 
Action:Command_Something(clientargs)
{
    
EmitSoundToAll("sound1.mp3");
    return 
Plugin_Handled;


Last edited by headline; 07-16-2015 at 11:06.
headline 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 00:27.


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