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

A fully radio sounds replacer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 12-30-2011 , 09:05   A fully radio sounds replacer
Reply With Quote #1

How could I make a fully replacer of all radio sounds? I've just found this plugin by connor which detects only "fire in the hole" sounds. I would like to have all radio commands in them.

http://forums.alliedmods.net/showthr...ighlight=radio
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 12-30-2011 , 14:19   Re: A fully radio sounds replacer
Reply With Quote #2

I think you have to hook 'SendAudio' message. The second parameter is a radio sound name.

Here is a part of NST replace radio sounds.

Code:
// Replace Radio
public message_SendAudio(msg_id, msg_dest, msg_entity)
{
    // get value
    new audio[64], audio_f[8], id, sex, mod_runing
    
    id = get_msg_arg_int(1)    
    sex = get_user_sex(id)
    get_msg_arg_string(2, audio, charsmax(audio))
    format(audio_f, charsmax(audio_f), "%s", audio)
    
    // replace sound radio 1 - 3
    new check, radio_new[64]
    for (new i=0; i<23; i++)
    {
        if( equal(audio[7], RADIO_MESSEAGE[i]))
        {
            format(radio_new, charsmax(radio_new), "%s", get_urlsound_radio(RADIO_FILE[i], sex))
            check = 1
        }
    }
    
    // replace sound radio other
    if (equal(audio_f, "%!MRAD_") && !check)
    {
        // radio one
        replace(audio, charsmax(audio), "%!MRAD_", "")
        strtolower(audio)
        format(radio_new, charsmax(radio_new), "%s", get_urlsound_radio(audio, sex))
    }
    
    // replace radio
    if (file_exists(get_fullurl_radio(radio_new))) set_msg_arg_string(2, radio_new)
    
    return PLUGIN_CONTINUE
}
__________________


Last edited by NiHiLaNTh; 12-30-2011 at 14:21.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
bibu
Veteran Member
Join Date: Sep 2010
Old 12-31-2011 , 05:12   Re: A fully radio sounds replacer
Reply With Quote #3

Could you show the full code of that?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu 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 00:02.


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