Raised This Month: $51 Target: $400
 12% 

For server plugin programer: Interfaces


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bugbait2
New Member
Join Date: Dec 2004
Old 12-08-2004 , 03:05   For server plugin programer: Interfaces
Reply With Quote #1

This thread shows how to use new interfaces and as example emitsound and some fx effects in a server plugin.

http://www.hl2coding.com/forums/viewtopic.php?t=31

I hope to see funny results
bugbait2 is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-08-2004 , 13:52  
Reply With Quote #2

too bad there are only like 8 effects
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
imported_pyr0
Junior Member
Join Date: Feb 2005
Old 02-03-2005 , 23:52  
Reply With Quote #3

Does anyone know what the flags are for emitsound. I would ask over there but am too lazy to register for the forums .

What I'm trying to do is emit the sound at the location of the player but when they move away from that spot they move away from the sound too. Right now the sound follows the player wherever they go.
imported_pyr0 is offline
imported_pyr0
Junior Member
Join Date: Feb 2005
Old 02-03-2005 , 23:54  
Reply With Quote #4

doh...maybe it would help to do a little research BEFORE asking. soundflags.h seems to define the flags

Didn't help me accomplish what I wanted though.
imported_pyr0 is offline
theqizmo
Member
Join Date: Oct 2004
Old 02-04-2005 , 00:35  
Reply With Quote #5

Quote:
Posted: Tue Dec 07, 2004 12:56 pm
Welcome to last year.
theqizmo is offline
Send a message via ICQ to theqizmo Send a message via AIM to theqizmo Send a message via MSN to theqizmo
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 02-20-2005 , 21:07  
Reply With Quote #6

It would still be nice to know how to use EmitSound.

I've been trying to learn how to use it, and even make some basic functions to make it easier, but it always crashes the server when I either use PrecacheSound, or EmitSound.

Code:
void EmitSound(int index, const char *soundfile)
{
	MRecipientFilter mrf;
	IEngineSound *esound = NULL;
	mrf.AddPlayer(index);
	bool play;
	if (esound->IsSoundPrecached(soundfile) == true) {
		play = true;
	}
	else {
		play = esound->PrecacheSound(soundfile, true);
	}
	if (play == true) {
		esound->EmitSound((IRecipientFilter &)mrf, index, CHAN_AUTO, soundfile, 0.7, ATTN_NORM, 0, 100);
	}
}
sslice is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 02-21-2005 , 00:26  
Reply With Quote #7

Quote:
Originally Posted by Geesu
too bad there are only like 8 effects
http://www.sourcemod.net/~sourcemod/...opic.php?t=360

And don't neglect DispatchEffect
__________________
Avoid like the plague.
vancelorgin 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 13:53.


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