Raised This Month: $ Target: $400
 0% 

Detect CT join


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-29-2014 , 15:55   Detect CT join
Reply With Quote #1

Im trying to detect CT joining in my ratio plugin.
But the event doesnt seems to work

Code:
register_event("TextMsg", "EVENT_PlayerJoinCT", "b", "2&#Game_join_ct");
Code:
public EVENT_PlayerJoinCT(id)
{	
	ColorChat( id, GREY, "%s Debug 1", TAG );
}
It doesnt print anything in the chat/console when someone joins CT
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
DavidJr
Senior Member
Join Date: Apr 2012
Old 01-29-2014 , 19:06   Re: Detect CT join
Reply With Quote #2

Team info?

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("TeamInfo""event_TeamInfo""a");
    
    
// Add your code here...
}

public 
event_TeamInfo()
{
    static 
idszTeam[32];
    
read_data(2szTeamsizeof szTeam); 
    
    if (!
is_user_connected(id)) return; 
    
    switch (
szTeam[0])
    {
        case 
'T':
        {
            
//user joins T
        
}
        case 
'C':
        {
            
// user joins CT
        
}
    }

__________________
What are you looking for here?
DavidJr is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-29-2014 , 21:31   Re: Detect CT join
Reply With Quote #3

register_event("TextMsg", "EVENT_PlayerJoinCT", "b", "2&#Game_join_ct");

Are you sure that's an event sent to just one player?

#Game_join_ct text is sent by UTIL_ClientPrintAll, and that sends a global message, so it must be "a"
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 18:59.


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