AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Bomb Planted / T Win / CT Win (https://forums.alliedmods.net/showthread.php?t=175944)

bLacK-bLooD 01-11-2012 10:10

Bomb Planted / T Win / CT Win
 
Hi, i would like to change the message :

"The bomb has been planted !"
"Counter-Terrorists Win !"
"Terrorists Win !"

I looked in .sma and multilanguage files but i could not find them anywhere. It is a plugin needed?

I know a lot of people looking for this.

Regards, bLacK-bLood.

bibu 01-11-2012 14:08

Re: Bomb Planted / T Win / CT Win
 
http://forums.alliedmods.net/showpos...71&postcount=6

bLacK-bLooD 01-12-2012 07:50

Re: Bomb Planted / T Win / CT Win
 
It's a hud message. I just want text message as it's default "Counter-Terrorists Win !"

Not HUD, text.

bibu 01-12-2012 12:04

Re: Bomb Planted / T Win / CT Win
 
Try this then:

PHP Code:

#include <amxmodx>

#define VERSION "0.0.1"
#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"#CTs_Win",            "Counter-Terrorists Win!")
    
TrieSetString(g_tReplacements"#Terrorists_Win",    "Terrorists Win!")
}

public 
Message_TextMsg(iMsgIdiMsgDestid)
{
    if( !
id && get_msg_arg_int(1) == print_center )
    {
        new 
szMessage[32]
        
get_msg_arg_string(2szMessagecharsmax(szMessage))
        if( 
TrieGetString(g_tReplacementsszMessageszMessagecharsmax(szMessage)) )
        {
            
client_print(0print_center"%s"szMessage)
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE



bLacK-bLooD 01-13-2012 04:25

Re: Bomb Planted / T Win / CT Win
 
Great ! It's working now.

Where can i find those "#Bomb_Planted" things?

I found them in resource/cstrike_english.txt , but some of them aren't working, like :

"#Game_bomb_drop"
"#Carry_Anymore"
"#Name_change_at_respawn"

etc. Why?

bLacK-bLooD 01-15-2012 04:18

Re: Bomb Planted / T Win / CT Win
 
Still can't figure it out guys.

Sn!ff3r 02-11-2013 22:47

Re: Bomb Planted / T Win / CT Win
 
@bibu, use set_msg_arg_string instead of additional client_print :)


All times are GMT -4. The time now is 22:14.

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