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

FM_EmitSound help/problem...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShAyA
Member
Join Date: Oct 2005
Old 11-26-2005 , 21:26   FM_EmitSound help/problem...
Reply With Quote #1

Well as usual im coding for ESF for an idea of mine, the only way I know that this event happens (accurately), is if this sound is played...

Well I dont know why, but It just isnt working... the method doesnt get called at all... Ive tried so many things, its given me headaches I know its probably something small or simple ive missed and im an idiot but ughh...

Code:
public plugin_init()
{
	register_plugin("Hi", "Moo", "ShAyA")
	register_forward(FM_EmitSound, "cEmitSound" )
}

public cEmitSound(entity, channel, const sound[]) {
	if(entity < 1 || entity > 32) 
		return FMRES_IGNORED;
	console_print(0, "HELLO")
	return FMRES_SUPERCEDE;
}
Thats what I have at the moment to even see if a sound happens, but nothing, sounds still play, no console printing of hello to all me and bots ;| is there something im missing?

P.S. There are no compiling errors, I have fakemeta included
ShAyA is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-26-2005 , 22:00  
Reply With Quote #2

It's probably not emitted by a player, and is thus more than 32.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
ShAyA
Member
Join Date: Oct 2005
Old 11-26-2005 , 22:07  
Reply With Quote #3

Well I tried without the entity num thing at the start and it still didnt work...

like i had console_print(0, "Hello") just under the bracket and nothing.. :S
ShAyA is offline
ShAyA
Member
Join Date: Oct 2005
Old 11-27-2005 , 06:14  
Reply With Quote #4

Bump? :S
ShAyA is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-27-2005 , 06:39  
Reply With Quote #5

My guess - you are talking not about emitted sound.
Maybe SendAudio event or something like spk cmd.
Or maybe this is a client side sound.
VEN is offline
ShAyA
Member
Join Date: Oct 2005
Old 11-28-2005 , 00:29  
Reply With Quote #6

Im pretty sure there are -some- emitted sounds, because other plugins show emitsound, with a replacing of a sound and say it works, but my one doesnt even seem to run, without any params just those and printing console_print(0, "Hello, %s", sound)

What is SendAudio or spk command?
ShAyA is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 11-28-2005 , 06:12  
Reply With Quote #7

Just as I said in Coders lounge - you can't catch those sounds ( as far as mine studies tell me )

P.S.

h4xxing accounts rulz XD
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
ShAyA
Member
Join Date: Oct 2005
Old 11-28-2005 , 20:21  
Reply With Quote #8

But as i also said... shouldnt there be SOME SOUNDS that are emitted... I cant seem to see ANY SOUNDS getting emitted at all.
ShAyA is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-30-2005 , 13:54  
Reply With Quote #9

I got it.

The problem probably is here:
Code:
console_print(0, "HELLO")
This code print "HELLO" at the server console.
But you probably expect appearance of this message at the client console. :)

Use this:
Code:
client_print(0, print_console, "HELLO")
VEN 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 20:37.


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