Raised This Month: $65 Target: $400
 16% 

[CS:GO] Team Limit Bypass


Post New Thread Reply   
 
Thread Tools Display Modes
dyxL
Member
Join Date: Jul 2010
Old 02-02-2018 , 11:16   Re: [CS:GO] Team Limit Bypass
Reply With Quote #41

is this working ?
dyxL is offline
PinHeaDi
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 02-12-2018 , 06:30   Re: [CS:GO] Team Limit Bypass
Reply With Quote #42

Will this work?

PHP Code:
#pragma semicolon 1

#define PLUGIN_NAME "[CSGO] Team Limit Bypass"
#define PLUGIN_AUTHOR "Zephyrus"
#define PLUGIN_DESCRIPTION "Bypasses hardcoded team limits"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_URL ""

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma newdecls required

enum EJoinTeamReason
{
    
k_OneTeamChange=0,
    
k_TeamsFull=1,
    
k_TTeamFull=2,
    
k_CTTeamFull=3
}

int g_iTSpawns=-1;
int g_iCTSpawns=-1;
int g_iSelectedTeam[MAXPLAYERS+1];

public 
Plugin myinfo =
{
    
name PLUGIN_NAME,
    
author PLUGIN_AUTHOR,
    
description PLUGIN_DESCRIPTION,
    
version PLUGIN_VERSION,
    
url PLUGIN_URL
};

public 
void OnPluginStart()
{
    
HookEvent("jointeam_failed"Event_JoinTeamFailedEventHookMode_Pre);
    
AddCommandListener(Command_JoinTeam"jointeam");
}

public 
void OnMapStart()
{
    
g_iTSpawns=-1;
    
g_iCTSpawns=-1;

    
// Give plugins a chance to create new spawns
    
CreateTimer(0.1Timer_OnMapStart);
}

public 
void OnClientConnected(int client)
{
    
g_iSelectedTeam[client]=0;
}

public 
Action Timer_OnMapStart(Handle timerany data)
{
    
g_iTSpawns=0;
    
g_iCTSpawns=0;

    
int ent = -1;
    while((
ent FindEntityByClassname(ent"info_player_counterterrorist")) != -1) ++g_iCTSpawns;
    
ent = -1;
    while((
ent FindEntityByClassname(ent"info_player_terrorist")) != -1) ++g_iTSpawns;

    return 
Plugin_Stop;
}

public 
Action Event_JoinTeamFailed(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    if(!
client || !IsClientInGame(client))
        return 
Plugin_Continue;

    
EJoinTeamReason m_eReason view_as<EJoinTeamReason>(event.GetInt("reason"));

    
int m_iTs GetTeamClientCount(CS_TEAM_T);
    
int m_iCTs GetTeamClientCount(CS_TEAM_CT);

    
char value[4];
    
Handle allowedteam FindConVar("mp_humanteam");
    
GetConVarString(allowedteamvaluesizeof(value));
    
    switch(
m_eReason)
    {
        case 
k_OneTeamChange:
        {
            return 
Plugin_Continue;
        }

        case 
k_TeamsFull:
        {
            if(
m_iCTs == g_iCTSpawns && m_iTs == g_iTSpawns)
                return 
Plugin_Continue;
        }

        case 
k_TTeamFull:
        {
            if(
m_iTs == g_iTSpawns && StrEqual(value"t"true) && !StrEqual(value"ct"true))
            {
                return 
Plugin_Continue;
            }
            else 
// if it's "any"
            
{
                return 
Plugin_Continue;
            }
        }

        case 
k_CTTeamFull:
        {
            if(
m_iCTs == g_iCTSpawns && StrEqual(value"ct"true) && !StrEqual(value"t"true))
            {
                return 
Plugin_Continue;
            }
            else 
// if it's "any"
            
{
                return 
Plugin_Continue;
            }
        }

        default:
        {
            return 
Plugin_Continue;
        }
    }
    
    
delete allowedteam;
    
ChangeClientTeam(clientg_iSelectedTeam[client]);

    return 
Plugin_Handled;
}

public 
Action Command_JoinTeam(int clientchar[] commandint args)
{
    if(!
args || !client || !IsClientInGame(client))
        return 
Plugin_Continue;

    
char m_szTeam[8];
    
GetCmdArg(1m_szTeamsizeof(m_szTeam));
    
int m_iTeam StringToInt(m_szTeam);

    if(
CS_TEAM_SPECTATOR<=m_iTeam<=CS_TEAM_CT)
    {
        
g_iSelectedTeam[client]=m_iTeam;
        return 
Plugin_Continue;
    }
    
    return 
Plugin_Handled;
    

I want the plugin to check for "mp_humanteam" and if it's "t" the player won't be able to abuse the plugin and join as "ct" for example.

Also, here's the plugin with the new syntax, without any additional editing:
PHP Code:
#pragma semicolon 1

#define PLUGIN_NAME "[CSGO] Team Limit Bypass"
#define PLUGIN_AUTHOR "Zephyrus"
#define PLUGIN_DESCRIPTION "Bypasses hardcoded team limits"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_URL ""

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma newdecls required

enum EJoinTeamReason
{
    
k_OneTeamChange=0,
    
k_TeamsFull=1,
    
k_TTeamFull=2,
    
k_CTTeamFull=3
}

int g_iTSpawns=-1;
int g_iCTSpawns=-1;
int g_iSelectedTeam[MAXPLAYERS+1];

public 
Plugin myinfo =
{
    
name PLUGIN_NAME,
    
author PLUGIN_AUTHOR,
    
description PLUGIN_DESCRIPTION,
    
version PLUGIN_VERSION,
    
url PLUGIN_URL
};

public 
void OnPluginStart()
{
    
HookEvent("jointeam_failed"Event_JoinTeamFailedEventHookMode_Pre);
    
AddCommandListener(Command_JoinTeam"jointeam");
}

public 
void OnMapStart()
{
    
g_iTSpawns=-1;
    
g_iCTSpawns=-1;

    
// Give plugins a chance to create new spawns
    
CreateTimer(0.1Timer_OnMapStart);
}

public 
void OnClientConnected(int client)
{
    
g_iSelectedTeam[client]=0;
}

public 
Action Timer_OnMapStart(Handle timerany data)
{
    
g_iTSpawns=0;
    
g_iCTSpawns=0;

    
int ent = -1;
    while((
ent FindEntityByClassname(ent"info_player_counterterrorist")) != -1) ++g_iCTSpawns;
    
ent = -1;
    while((
ent FindEntityByClassname(ent"info_player_terrorist")) != -1) ++g_iTSpawns;

    return 
Plugin_Stop;
}

public 
Action Event_JoinTeamFailed(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    if(!
client || !IsClientInGame(client))
        return 
Plugin_Continue;

    
EJoinTeamReason m_eReason view_as<EJoinTeamReason>(event.GetInt("reason"));

    
int m_iTs GetTeamClientCount(CS_TEAM_T);
    
int m_iCTs GetTeamClientCount(CS_TEAM_CT);

    switch(
m_eReason)
    {
        case 
k_OneTeamChange:
        {
            return 
Plugin_Continue;
        }

        case 
k_TeamsFull:
        {
            if(
m_iCTs == g_iCTSpawns && m_iTs == g_iTSpawns)
                return 
Plugin_Continue;
        }

        case 
k_TTeamFull:
        {
            if(
m_iTs == g_iTSpawns)
                return 
Plugin_Continue;
        }

        case 
k_CTTeamFull:
        {
            if(
m_iCTs == g_iCTSpawns)
                return 
Plugin_Continue;
        }

        default:
        {
            return 
Plugin_Continue;
        }
    }
    
    
ChangeClientTeam(clientg_iSelectedTeam[client]);

    return 
Plugin_Handled;
}

public 
Action Command_JoinTeam(int clientchar[] commandint args)
{
    if(!
args || !client || !IsClientInGame(client))
        return 
Plugin_Continue;

    
char m_szTeam[8];
    
GetCmdArg(1m_szTeamsizeof(m_szTeam));
    
int m_iTeam StringToInt(m_szTeam);

    if(
CS_TEAM_SPECTATOR<=m_iTeam<=CS_TEAM_CT)
    {
        
g_iSelectedTeam[client]=m_iTeam;
        return 
Plugin_Continue;
    }
    
    return 
Plugin_Handled;
    

__________________

Last edited by PinHeaDi; 02-12-2018 at 06:36.
PinHeaDi is offline
AuricYoutube
Senior Member
Join Date: Aug 2016
Location: Here
Old 02-13-2018 , 10:40   Re: [CS:GO] Team Limit Bypass
Reply With Quote #43

do you know how to fix the problem where it takes time to join a team
AuricYoutube is offline
All
New Member
Join Date: Apr 2017
Old 10-20-2018 , 06:32   Re: [CS:GO] Team Limit Bypass
Reply With Quote #44

how to make plugins work on bots?
All is offline
Reply


Thread Tools
Display Modes

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 06:59.


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