AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   emit_sound not working? (https://forums.alliedmods.net/showthread.php?t=13849)

PyRo 05-31-2005 10:56

emit_sound not working?
 
Here's a very simple test I was trying

Code:

public voice_exterminate(id) {
        if (is_user_connected(id) && is_user_alive(id) && !is_user_bot(id) && !is_user_hltv(id)) {
                emit_sound(id,CHAN_VOICE, "misc/exterminate.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
        return PLUGIN_HANDLED
}


public plugin_init() {
        register_plugin("blah", "blah", "blah")
        register_clcmd("voice_exterminate","voice_exterminate")
        precache_sound("misc/exterminate.wav")
        return PLUGIN_CONTINUE
}

When I try voice_exterminate in game nothing happens when I think it should play misc/exterminate.wav
The wav file is 92.6kb, 352kbps, 16bit, mono and 22khz and it plays fine via the spk command.

Any idea what I'm doing wrong?

Pyro

LynX 05-31-2005 11:40

errrrmmmm... maybe do precache_sound in public plugin_precache() :lol:

PyRo 05-31-2005 11:54

Quote:

Originally Posted by LynX
errrrmmmm... maybe do precache_sound in public plugin_precache() :lol:

/me runs away and hides
I knew it was something obvious, thanks :lol: :)


All times are GMT -4. The time now is 16:37.

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