Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

WHich Mod To Allow Only 1 Team to Play
#1

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 Big Grin
Since Its my first server and m not experienced.
Reply
#2

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);
    }
}
Reply
#3

http://forums.alliedmods.net/showthread.php?p=1316217
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)