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

Name is joining the (Counter-)Terrorist force


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-30-2007 , 18:28   Name is joining the (Counter-)Terrorist force
Reply With Quote #1

Hi, I've searched all the forum but couldn't find the thing I want:
When player joins the game and choose the team, everyone gets a message like:

hleV is joining the Terrorist force

I want exactly as in Counter-Strike: Source.

Anyone could make this or tell me, where can i get it?
hleV is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-30-2007 , 18:41   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #2

I'm going to release very soon a plugin which this feature is integrated. So if you can be a little patient it would be nice.
__________________

Last edited by Arkshine; 11-30-2007 at 18:45.
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-13-2007 , 08:26   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #3

So?..
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-13-2007 , 08:34   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #4

Arkshine is working on a hudge plugin so you have to be patient


Untested :
PHP Code:
#include <amxmodx>

new const Terrorist[] = "Terrorist"
new const CounterTerrorist[] = "Counter-Terrorist"
new const Spectator[] = "Spectator"

new bool:g_already_joined[33]

new 
display_botsdisplay_oncedisplay_spec
    
te_colorct_colorsp_color,
    
display_typejtm_text
    
gmsgSayTextg_syncObj

public plugin_init() {
    
register_plugin("Join Team Message""0.2""connorr")

    
display_bots register_cvar("jtm_bots""0"// show a hud message if a bot joins a team
    
display_once register_cvar("jtm_once""1"// show only the first time someone is joining a team
    
display_spec register_cvar("jtm_spec""0"// show if a player is joining spectator team

    
te_color register_cvar("jtm_t_color""250 0 0"// RRR GGG BBB
    
ct_color register_cvar("jtm_ct_color""0 0 250"// RRR GGG BBB
    
sp_color register_cvar("jtm_spec_color""250 250 250"// RRR GGG BBB

    
jtm_text register_cvar("jtm_text""!t%name !nis joining the !t%team !nforce"// !t = team color , !n = normal chat color , !g = green

    
display_type register_cvar("jtm_display_type""0"// 0 : chat , 1 : hud message , 2 : colored chat message

    
register_logevent("JoinTeam"3"1=joined team")
}

public 
plugin_cfg() {
    
gmsgSayText get_user_msgid("SayText")
    
g_syncObj CreateHudSyncObj()
}

public 
client_putinserver(id) {
    
g_already_joined[id] = false
}

public 
JoinTeam() {
    new 
loguser[80], name[32]
    
read_logargv(0loguser79)
    
parse_loguser(logusername31)

    new 
id get_user_index(name)

    new 
once get_pcvar_num(display_once)
    if( 
g_already_joined[id] && once )
        return
    
    if( 
is_user_bot(id) && !get_pcvar_num(display_bots) )
        return

    
g_already_joined[id] = true

    
new temp[2], team[20], color[12], red[4], green[4], blue[4]
    new 
type get_pcvar_num(display_type)

    
read_logargv(2temp1)
    switch(
temp[0])
    {
        case 
'T' :
        {
            
formatex(team19Terrorist)
            if(
type == 1)
            {
                
get_pcvar_string(te_colorcolor11)
                
parse(colorred3green3blue3)
            }
        }
        case 
'C' :
        {
            
formatex(team19CounterTerrorist)
            if(
type == 1)
            {
                
get_pcvar_string(ct_colorcolor11)
                
parse(colorred3green3blue3)
            }
        }
        case 
'S' :
        {
            if( 
get_pcvar_num(display_spec) )
            {
                
formatex(team19Spectator)
                if(
type==1)
                {
                    
get_pcvar_string(sp_colorcolor11)
                    
parse(colorred3green3blue3)
                }    
            }
            else
            {
                if( 
once )
                {
                    
g_already_joined[id] = false
                
}
                return
            }
        }
    }

    new 
msg[128]
    
get_pcvar_string(jtm_textmsg127)
    
replace(msg127"%name"name)
    
replace(msg127"%team"team)

    switch(
type)
    {
        case 
0:
        {
            
replace_all(msg127"!n""")
            
replace_all(msg127"!t""")
            
replace_all(msg127"!g""")
            
client_print(0print_chatmsg)
        }
        case 
1:
        {
            
replace_all(msg127"!n""")
            
replace_all(msg127"!t""")
            
replace_all(msg127"!g""")
            
set_hudmessage(str_to_num(red), str_to_num(green), str_to_num(blue), -1.00.3506.012.00.10.2, -1)
            
ShowSyncHudMsg(0g_syncObjmsg)
        }
        case 
2:
        {
            
replace_all(msg127"!n""^x01")
            
replace_all(msg127"!t""^x03")
            
replace_all(msg127"!g""^x04")
            
message_begin(MSG_ALLgmsgSayText)
            
write_byte(id)
            
write_string(msg)
            
message_end()
        }
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-19-2007 at 07:11.
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-17-2007 , 07:50   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #5

I don't want hud message. I want this:
[IMG]http://img164.**************/img164/3559/joiningrl5.png[/IMG]

Last edited by hleV; 12-17-2007 at 07:54.
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-17-2007 , 10:38   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #6

Sorry but i don't now that game, how do you call it ? Counter-Strike: Source.
So i didn't know how is the message.

Updated, set cvar jtm_display_type to 0 to have chat messages.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-17-2007 , 11:50   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #7

Thanks for a great plugin. ;)

Note: It should just type "%s is joining the %s force" without * at the beginning and without ! at the end of the text. Anyway, good job. ;)
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-17-2007 , 13:21   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #8

Feel free to edit.

I can add colored chat if you want.

hleV is joining the Counter-Terrorist force

or

hleV is joining the Counter-Terrorist force
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kimi
Member
Join Date: Nov 2007
Location: Home...
Old 12-19-2007 , 05:57   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #9

Quote:
Originally Posted by connorr View Post
Feel free to edit.

I can add colored chat if you want.

hleV is joining the Counter-Terrorist force

or

hleV is joining the Counter-Terrorist force
Can you make it colored for me please ?? Thanks !
__________________
[img]http://img100.**************/img100/7245/unititledja1.png[/img]


Last edited by Kimi; 12-19-2007 at 07:11.
Kimi is offline
Monkis
Member
Join Date: Nov 2007
Location: Lithuania
Old 12-19-2007 , 06:53   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #10

hi , why is not colored for me ??
im just changed text [img]http://rapidshare.com/files/77623279/untitled.bmp[/img]

Last edited by Monkis; 12-19-2007 at 06:56.
Monkis 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 16:04.


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