Raised This Month: $ Target: $400
 0% 

Solved [HELP] Replacing "Fire In The Hole"


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hellmonja
Senior Member
Join Date: Oct 2015
Old 01-17-2017 , 12:24   [HELP] Replacing "Fire In The Hole"
Reply With Quote #1

Like the title says, that's all I want to do. It seems simple enough but for some reason it doesn't work. When I remove the codes for the custom messages it works but when it's there it doesn't do anything, not even block the original sound.
PHP Code:
public Message_Audio(msg_idmsg_destmsg_entity)
{
    if(
get_msg_args() != || get_msg_argtype(2) != ARG_STRING)
        return 
PLUGIN_CONTINUE


    
new arg2[20], wpn get_user_weapon(msg_entity);
    
get_msg_arg_string(2arg219);
    
    if(
equal(arg2[1], "!MRAD_FIREINHOLE"))
    {

        if(
wpn == CSW_HEGRENADE)
        {
            
emessage_begin(MSG_ONE_UNRELIABLEg_iMsgSendAudio_msg_entity);
            
ewrite_byte(msg_entity);
            
ewrite_string(grenade_snds[random_num(01)]);
            
ewrite_short(PITCH_NORM);
            
emessage_end();
        }
        
        return 
PLUGIN_HANDLED

    
}

    return 
PLUGIN_CONTINUE

I've checked the API, the forums, some Russian sites I had to translate, and everything I could think of to google. I just want some help. Please don't make feel a lot more stupid than I already am...
__________________

Last edited by hellmonja; 01-21-2017 at 13:09. Reason: Solved...
hellmonja 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 20:42.


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