Results 1 to 3 of 3

Thread: WHich Mod To Allow Only 1 Team to Play

  1. #1
    ScorpionBlues's Avatar



    Join Date
    Jun 20, 2011
    Last Online
    Feb 15, 2014
    Posts
    261
    Threads
    39
    Reputation
    SourceOP Thread


        
    Steam: 76561198035380358 
    Steam join date: Dec 21, 2010
    Steam Level: 43
    Profile Status: Public


    WHich Mod To Allow Only 1 Team to Play


    Hello,

    I've a Set Up a Jump Server, I m looking for a Mod by which I can restrict Red/Blu team. So Only 1 Color Team is allowed to play.

    Can't Find that SM Mod, is there anyone who can help me by telling its name.

    Also, I m stuck @ Installing Class Restrict Mod to Soldier Only, So Maybe If someone can help me installing these mod I will be really thankful
    Since Its my first server and m not experienced.

  2. #2
    1NHI's Avatar



    Join Date
    Jan 22, 2012
    Last Online
    Jun 22, 2012
    Posts
    86
    Threads
    14




    Code:
    #include <sourcemod>
    #include <sdktools>
    #include <tf2_stocks>
    #include <tf2>
    
    new iTeamIndex = 3; // 2
    
    public OnPluginStart()
    	HookEvent("player_spawn", OnPlayerSpawn);
    
    public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
    {
    	new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    	if(!IsPlayerAlive(client))
    		return;
    
    	if(GetClientTeam(client) != iTeamIndex)
    	{
    		SetEntProp(client, Prop_Send, "m_lifeState", 2);
    		ChangeClientTeam(client, iTeamIndex);
    		SetEntProp(client, Prop_Send, "m_lifeState", 0);
    	}
    
    	if(TF2_GetPlayerClass(client) != TFClass_Soldier)
    	{
    		TF2_SetPlayerClass(client, TFClass_Soldier, false);
    		TF2_RegeneratePlayer(client);
    	}
    }

  3. #3
    Skyrider's Avatar



    Join Date
    Feb 29, 2008
    Last Online
    Dec 01, 2024
    Posts
    1,098
    Threads
    69
    Reputation
    SourceOP Thread


        
    Steam: 76561197983696188 
    Steam join date: Jul 12, 2006
    Steam Level: 76
    Profile Status: Public