Raised This Month: $ Target: $400
 0% 

Blocking Fire in the hole sound and text


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
cigs
Senior Member
Join Date: Jul 2006
Old 08-23-2006 , 17:55   Re: Blocking Fire in the hole sound and text
Reply With Quote #8

It think it only happened to you, Cheap_Suit, cause it works just fine.

Now, I need some help with what I additionally tried to add in this plugin.
I added a custom sound (hepin.wav) sounding like a pin that is getting pulled out of the nade.

Here's what I made from it:

Code:
/*
Fire In The Hole Blocker
*/

#include <amxmodx>

#define PLUGIN "FITHBlocker"
#define VERSION "1.0"
#define AUTHOR "VEN & Cheap_Suit"

#define SOUND_HEPIN "misc/hepin.wav"

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR)
    register_message(get_user_msgid("TextMsg"), "msg_text")
    register_message(get_user_msgid("SendAudio"), "msg_audio")
}


public msg_text()
{
    if(get_msg_args() != 5 || get_msg_argtype(3) != ARG_STRING || get_msg_argtype(5) != ARG_STRING) {
        return PLUGIN_CONTINUE
    }

    new arg3[16]
    get_msg_arg_string(3, arg3, 15)
    if(!equal(arg3, "#Game_radio")) {
        return PLUGIN_CONTINUE
    }

    new arg5[20]
    get_msg_arg_string(5, arg5, 19)
    if(equal(arg5, "#Fire_in_the_hole")) {
            return PLUGIN_HANDLED
    }

    return PLUGIN_CONTINUE
}

public msg_audio()
{
    if(get_msg_args() != 3 || get_msg_argtype(2) != ARG_STRING) {
        return PLUGIN_CONTINUE
    }

    new arg2[20]
    get_msg_arg_string(2, arg2, 19)
    if(equal(arg2[1], "!MRAD_FIREINHOLE"))
    {
        client_cmd(0,"spk %s", SOUND_HEPIN)
        return PLUGIN_HANDLED
    }

    return PLUGIN_CONTINUE
}
As you can see I added
Code:
#define SOUND_HEPIN "misc/hepin.wav"
and
Code:
client_cmd(0,"spk %s", SOUND_HEPIN)
This innitially works.
- But for some reason it doesn't work for some players ingame and it does for others
- And secondly, after about 15 minutes, people (including me) are getting sound problems on the server. (an echo-like soundproblem)
PS: I got confirmed by several people they've download the hepin.wav file

Is there anything wrong with what I added/did?
__________________

Last edited by cigs; 08-24-2006 at 07:12.
cigs is offline
 



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 16:34.


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