Raised This Month: $ Target: $400
 0% 

Show After Team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deadman909
Veteran Member
Join Date: Oct 2008
Old 09-19-2011 , 20:11   Show After Team
Reply With Quote #1

How would one make something appear only after one chooses a team.

Like after they join the Team have it Say You have joined the TERRORIST TEAM.
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 20:23   Re: Show After Team
Reply With Quote #2

When first joining a team it fires teaminfo when you select a team and a model so when its >= 2 its when the player has fully choosen a team.
PHP Code:
new iTeamInfoCounter[33];

register_event("TeamInfo""eTeamInfo""a");

public 
eTeamInfo() 

    new 
id read_data(1);
    new 
szTeam[2];
    
read_data(2szTeamcharsmax(szTeam));
    switch(
szTeam[0])
    {
        case 
'T'
        {
            if(++
iTeamInfoCounter[id] >= 2)
            {
                
//Terror waiting for reSpawn
            
}
        }
        case 
'C'
        {
            if(++
iTeamInfoCounter[id] >= 2)
            {
                
//CT Waiting for ReSpawn
            
}
        }
        case 
'S':
        {
            
//Switch to Spectate
        
}
    }

Doc-Holiday is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 09-19-2011 , 23:21   Re: Show After Team
Reply With Quote #3

This makes the message appear every time the new round starts. Is there a way to set it so it only appears the first time they connect or reconnect to server?
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 23:26   Re: Show After Team
Reply With Quote #4

Quote:
Originally Posted by deadman909 View Post
This makes the message appear every time the new round starts. Is there a way to set it so it only appears the first time they connect or reconnect to server?
change it ==2 not >=
Doc-Holiday is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 09-20-2011 , 00:21   Re: Show After Team
Reply With Quote #5

Quote:
Originally Posted by Doc-Holiday View Post
change it ==2 not >=
That worked but now msg doesnt show after a player reconnects.
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-20-2011 , 01:14   Re: Show After Team
Reply With Quote #6

Quote:
Originally Posted by deadman909 View Post
That worked but now msg doesnt show after a player reconnects.
on player disconnect you have to reset the counter
Doc-Holiday is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 09-20-2011 , 05:22   Re: Show After Team
Reply With Quote #7

Quote:
Originally Posted by Doc-Holiday View Post
on player disconnect you have to reset the counter
Hmm I know it is

public client_disconnect()
{
// But not sure what goes here.
}
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-20-2011 , 05:33   Re: Show After Team
Reply With Quote #8

Quote:
Originally Posted by deadman909 View Post
Hmm I know it is

public client_disconnect(id)
{
// But not sure what goes here.
}
iTeamInfoCounter[id] = 0 <---- Make sure that matches the variable in the above code.
Doc-Holiday is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 09-20-2011 , 08:04   Re: Show After Team
Reply With Quote #9

register_event("TextMsg", "Join_T", "a", "2&#Game_join_t")
register_event("TextMsg", "Join_CT", "a", "2&#Game_join_ct")
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-20-2011 , 08:15   Re: Show After Team
Reply With Quote #10

http://forums.alliedmods.net/showthread.php?t=63818
__________________
hleV 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 19:44.


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