Raised This Month: $32 Target: $400
 8% 

[HELP] Code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Isstrati
Member
Join Date: Feb 2012
Location: Republic of Moldova/Chis
Old 04-04-2012 , 18:53   [HELP] Code.
Reply With Quote #1

I want to add more HUD msg. But not work all msg. What am I doing wrong ?
PHP Code:
#include <amxmodx>

#define VERSION "0.0.2"
#define PLUGIN ""

new Trie:g_tReplacements

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_message(get_user_msgid("TextMsg"), "Message_TextMsg")

    
g_tReplacements TrieCreate()
    
TrieSetString(g_tReplacements"#Bomb_Planted""The Bomb Has Been Planted !")
    
TrieSetString(g_tReplacements"#C4_Plant_At_Bomb_Spot""C4 Must Be Planted At a Bomb Site !")
    
TrieSetString(g_tReplacements"#Bomb_Defused""The Bomb Has Been Defused !")
    
TrieSetString(g_tReplacements"#CTs_Win""Counter-Terrorists Win ! ")
    
TrieSetString(g_tReplacements"#Terrorists_Win""Terrorists Win !")
    
TrieSetString(g_tReplacements"#Round_Draw""Round Draw !")
    
TrieSetString(g_tReplacements"#Game_bomb_drop" "%s1 dropped the bomb !")
    
TrieSetString(g_tReplacements"#Game_bomb_pickup""%s1 picked up the bomb !")
    
TrieSetString(g_tReplacements"#Got_bomb""ai ridicat c4 suka !")
    
TrieSetString(g_tReplacements"#Got_defuser""You picked up a defuser kit !")
    
TrieSetString(g_tReplacements"#OBS_ROAMING""")
}

public 
Message_TextMsg(iMsgIdiMsgDestid)
{
    if( !
id && get_msg_arg_int(1) == print_center )
    {
        new 
szMessage[64]
        
get_msg_arg_string(2szMessagecharsmax(szMessage))
        if( 
equal(szMessage"#Game_will_restart_in") )
        {
            new 
szArg1[4]
            
get_msg_arg_string(3szArg1charsmax(szArg1))
            
formatex(szMessagecharsmax(szMessage), "The game will restart in %s seconds"szArg1)
            
set_hudmessage(255255255, .channel=-1
            
show_hudmessage(0szMessage)
            return 
PLUGIN_HANDLED
        
}
        else if( 
TrieGetString(g_tReplacementsszMessageszMessagecharsmax(szMessage)) )
        {
            
set_hudmessage(255255255, .channel=-1
            
show_hudmessage(0szMessage)
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE


Last edited by Isstrati; 04-04-2012 at 18:56.
Isstrati is offline
Send a message via Skype™ to Isstrati
Reply


Thread Tools
Display Modes

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 11:02.


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