Raised This Month: $ Target: $400
 0% 

Need a AdminTeam Plugin for TF2 Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Desertwolf
New Member
Join Date: May 2014
Location: Germany
Old 05-13-2014 , 14:23   Need a AdminTeam Plugin for TF2 Server
Reply With Quote #1

Sup Guys,
me and few Peps have a TF2 Server and we need a Admin Team.smx
who make it posible that we can chose one team for us and
every non Admin Player goes to the other Team just like the
other Adminteam.smx´s just with a Admin Menu place to set wich team and who mabye

i say thx for every tip and help
Desertwolf~
Desertwolf is offline
Send a message via Skype™ to Desertwolf
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 05-13-2014 , 14:52   Re: Need a AdminTeam Plugin for TF2 Server
Reply With Quote #2

PHP Code:
#include <clientprefs>

public OnPluginStart()
{
  
AddCommandListener(JoinListener"jointeam");
}

public 
Action:JoinListener(client, const String:command[], argc)
{
  new 
String:team[50];
  
GetCmdArgString(teamsizeof(team));

  if (
StrEqual(team"auto")) // we also need to hook auto, otherwise it will allow everybody to join to both teams
  
{
    if (
GetAdminFlag(GetUserAdmin(client), Admin_Reservation)) // check if player has flag A
      
ChangeClientTeam(clientGetRandomInt(2,3)); // gets random numer. 2 = red, 3 = blue
    
else
      
ChangeClientTeam(client2); // red

    
return Plugin_Handled;
  }

  if (
GetAdminFlag(GetUserAdmin(client), Admin_Reservation)) // check if player has flag A
    
return Plugin_Continue;
  else {
    if (
StrEqual(team"blue"))
    {
      
PrintToChat(client"This team is reserver for admins Only.");
      
ChangeClientTeam(client2); // moves player to RED
      
return Plugin_Handled;
    }
  }

  return 
Plugin_Continue;

Static code, add dynamic change support yourself.

Last edited by LambdaLambda; 05-13-2014 at 15:18.
LambdaLambda is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-13-2014 , 15:19   Re: Need a AdminTeam Plugin for TF2 Server
Reply With Quote #3

except if i do "jointeam 3" in console and then it puts me on the blue team.
Mitchell is offline
Desertwolf
New Member
Join Date: May 2014
Location: Germany
Old 05-13-2014 , 16:13   Re: Need a AdminTeam Plugin for TF2 Server
Reply With Quote #4

thx guys that was helping us a lot
Desertwolf is offline
Send a message via Skype™ to Desertwolf
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 04:54.


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