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

TF2 "jointeam" command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-23-2008 , 08:13   TF2 "jointeam" command
Reply With Quote #1

Is the Consolecommand "jointeam" supported in TF2?
shubhishubhi is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-23-2008 , 14:09   Re: TF2 "jointeam" command
Reply With Quote #2

You could probably find the answer faster by going in-game and trying it out.
bl4nk is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 07-23-2008 , 16:48   Re: TF2 "jointeam" command
Reply With Quote #3

no, jointeam is NOT suppoerted in TF2.

However, thee is a functino that can be called to do that. It's the subject of one of the previous threads here in the scripting section.

Err... make the the snippets section.
naris is offline
DeviusCreed
Junior Member
Join Date: Dec 2006
Old 07-23-2008 , 17:58   Re: TF2 "jointeam" command
Reply With Quote #4

No, But you could hook "player_team" if thats what you need.
DeviusCreed is offline
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-24-2008 , 05:12   Re: TF2 "jointeam" command
Reply With Quote #5

I am writing a plugin for TF2 team assignment on player join. My code is
Quote:
#define RED_TEAM 2
#define BLU_TEAM 3

public OnPluginStart()
{
// Add your own code here...
RegConsoleCmd("jointeam",CommandJoinTeam);
}
public Action:CommandJoinTeam(client, args)
{
LogMessage("CommandJoinTeam Blue");
ChangeClientTeam(client, BLU_TEAM);
return Plugin_Handled;
}
Although the team assignment happens correctly but the Class Selection screen is not displayed? How can I get it shown after I forcefully assign a team to the player?
shubhishubhi is offline
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-24-2008 , 05:48   Re: TF2 "jointeam" command
Reply With Quote #6

I happen to find some link for classselection so have modified my code to :
Quote:
#define RED_TEAM 2
#define BLU_TEAM 3

public OnPluginStart()
{
// Add your own code here...
RegConsoleCmd("jointeam",CommandJoinTeam);
}
public Action:CommandJoinTeam(client, args)
{
LogMessage("CommandJoinTeam Blue");
ChangeClientTeam(client, BLU_TEAM);
ShowVGUIPanel(client, GetClientTeam(client) == 3 ? "class_blue" : "class_red");
return Plugin_Handled;
}
Now I am getting both the team and class selection screens! Just want to know if there are any other better ways of doing this!
shubhishubhi is offline
shubhishubhi
Senior Member
Join Date: Mar 2008
Old 07-28-2008 , 01:38   Re: TF2 "jointeam" command
Reply With Quote #7

Any inputs on this?
shubhishubhi 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 00:58.


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