Raised This Month: $ Target: $400
 0% 

colored name | fire in the hole event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-23-2010 , 07:20   Re: colored name | fire in the hole event
Reply With Quote #9

PHP Code:
/*    Formatright © 2010, ConnorMcLeod

    Descriptive Fire In The Hole Reloaded is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Descriptive Fire In The Hole Reloaded; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>

#define VERSION "0.2.0"

new g_iLocation
new g_iRmTextMsg

public plugin_init()
{
    
register_plugin("Descriptive Fire In The Hole Reloaded"VERSION"ConnorMcLeod")

    
register_event("SendAudio""Event_SendAudio_MRAD_FIREINHOLE""b""2=%!MRAD_FIREINHOLE")

    new 
szModName[7]
    
get_modname(szModNamecharsmax(szModName))
    if(
equal(szModName"czero"))
    {
        
register_event("Location""Event_Location""b")
    }
}

public 
Event_Location()
{
    
g_iLocation 1
}

public 
Event_SendAudio_MRAD_FIREINHOLE()
{
    
g_iRmTextMsg register_messageget_user_msgid("TextMsg") , "Message_TextMsg" )
}

public 
Message_TextMsg(iMsgId)
{
    new 
szType[64], szId[3]
    
get_msg_arg_string(2szIdcharsmax(szId))
    new 
iId get_user_weaponstr_to_num(szId) )
    if( 
g_iLocation )
    {
        
formatex(szTypecharsmax(szType), "^3%%s1^1 @ ^4%%s2^1 ( %s ): %%s3"get_grenade_typeiId ))
    }
    else
    {
        
formatex(szTypecharsmax(szType), "^3%%s1 ^1( %s ): %%s2"get_grenade_typeiId ))
    }
    
set_msg_arg_string(3szType)
    
unregister_message(iMsgIdg_iRmTextMsg)
}

get_grenade_typeiId )
{
    new 
szGrenade[20]
    switch( 
iId )
    {
        case 
CSW_HEGRENADE :
        {
            
szGrenade "^3He Grenade^1"
        
}
        case 
CSW_SMOKEGRENADE :
        {
            
szGrenade "Smoke Grenade"
        
}
        case 
CSW_FLASHBANG :
        {
            
szGrenade "^4FlashBang^1"
        
}
    }
    return 
szGrenade

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 03:35.


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