Raised This Month: $ Target: $400
 0% 

Name is joining the (Counter-)Terrorist force


Post New Thread Reply   
 
Thread Tools Display Modes
Kimi
Member
Join Date: Nov 2007
Location: Home...
Old 12-20-2007 , 16:41   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #21

It works for you but not for me ! And yes I've set that cvar and nothing. Sorry, but on my server it's even worst ! I can't describe it, that's why I asked for the previos version (even if it is not colored) at least that version worked ! That's all I want ! pls, and thanks !
__________________
[img]http://img100.**************/img100/7245/unititledja1.png[/img]

Kimi is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2007 , 17:01   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #22

Is your server Non-Steam? Just wondering
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Kimi
Member
Join Date: Nov 2007
Location: Home...
Old 12-20-2007 , 17:27   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #23

Yes ! Maybe that's the reason why is not working ?? I still don't belive it has any chance to work on my server, that's why I'm still asking for the previos version....
__________________
[img]http://img100.**************/img100/7245/unititledja1.png[/img]

Kimi is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-20-2007 , 17:30   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #24

So, set the cvar 0 or 1.
... or get steam.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2007 , 17:35   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #25

Just a generic note, but any user that uses Non-Steam is frowned upon here. So, it would be best to either try to fix it yourself or to take it privately. And yes, that is the reason why it is not working.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Kimi
Member
Join Date: Nov 2007
Location: Home...
Old 12-21-2007 , 03:35   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #26

Well I've set "0" and it works normaly now, but still not colored. That's not a problem but thanks anyway both of you !
__________________
[img]http://img100.**************/img100/7245/unititledja1.png[/img]

Kimi is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-23-2007 , 07:58   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #27

Is it possible to print message, that is in console? I mean when I join the server, it says in console "hleV is joining the Counter-Terrorist force". Ant with this plugin it doubles that message. So maybe it's possible to use that message ant make it to print in chat instead of creating new one?
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-23-2007 , 08:43   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #28

Sure

PHP Code:
#include <amxmodx>

new bool:g_already_joined[33]

new 
display_botsdisplay_once

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

    
display_bots register_cvar("jtm_bots""0"// show bots ?
    
display_once register_cvar("jtm_once""1"// show only the first time someone is joining a team

    
register_message(get_user_msgid("TextMsg"), "Hook_TextMsg")
}

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

public 
Hook_TextMsg(msg_idmsg_destmsg_ent) {

    if( 
get_msg_args() != )
        return

    new 
szMessage[21]
    
get_msg_arg_string(2szMessage20)
    if(
szMessage[1] != 'G' || szMessage[6] != 'j')
        return

    new 
szName[32]
    
get_msg_arg_string(3szName31)
    new 
id get_user_index(szName)

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

    
g_already_joined[id] = true

    
if(szMessage[11] == 'c' || szMessage[11] == 't')
        
set_msg_arg_int(10print_chat)

__________________
- tired and retired -

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

Very nice.
hleV is offline
Rumba
Member
Join Date: Aug 2007
Location: Hollywood
Old 02-17-2008 , 12:18   Re: Name is joining the (Counter-)Terrorist force
Reply With Quote #30

Quote:
Originally Posted by connorr View Post
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()
        }
    }

Not displayed in chat when join team spectator !
How do i resolve ?
Rumba 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 14:28.


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