AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   lol (https://forums.alliedmods.net/showthread.php?t=206110)

BodyBuilder 01-18-2013 15:20

lol
 
lol

YamiKaitou 01-18-2013 20:08

Re: what's wrong ?
 
Are you sure it is detecting the sound? Have you tried putting a print statement inside the IF to see if it even gets in there?

fysiks 01-19-2013 02:21

Re: what's wrong ?
 
Quote:

Originally Posted by BodyBuilder (Post 1876064)
how detecting the sound?

He is asking if your code is even detecting any sounds. You have to answer that question first.

NiHiLaNTh 01-19-2013 04:00

Re: what's wrong ?
 
I dont think that Longjump sound is even being played by EmitSound. :?

ConnorMcLeod 01-19-2013 04:15

Re: what's wrong ?
 
Try :

PHP Code:

if( equal(sample"fvox/blip blip(p130) powermove_on") ) 

or

PHP Code:

if( contain(sample"powermove_on") != -

If it is not working, it means that "!SOME_NUMBER" is passed, just print to yourself what is passed to emitSound when you pickup a longjump.
In that case, try :
PHP Code:

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "LongJump Pickup Sound Block"
#define VERSION "0.0.1"

new g_fwEmitSoundLj

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )

    
register_event("ItemPickup""Event_ItemPickup_LongJump""b""1=item_longjump")
}

public 
Event_ItemPickup_LongJump()
{
    
g_fwEmitSoundLj register_forward(FM_EmitSound"EmitSound_HEV_A1")
}

public 
EmitSound_HEV_A1()
{
    
unregister_forward(FM_EmitSoundg_fwEmitSoundLj)
    return 
FMRES_SUPERCEDE



ConnorMcLeod 01-19-2013 06:07

Re: what's wrong ?
 
What is working ??


All times are GMT -4. The time now is 13:43.

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