View Single Post
JocAnis
Veteran Member
Join Date: Jun 2010
Old 02-19-2023 , 07:45   Re: more than 1 terr in deathrun
Reply With Quote #3

hello, can you test this? meaning you dont need to edit your current deathrun manager:

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init()
{
    register_plugin( "Balance TR-CT", "1.0", "test" )
    register_event( "HLTV", "event_new_round", "a", "1=0", "2=0" )
}
public event_new_round()
    set_task( 0.2, "check_balance" ) //idk why set task, maybe to not have issue with your original transfer/dr plugin

public check_balance()
{
    new CTplayers[ 32 ], CTnum, random_player, name[ 32 ]
    get_players( CTplayers, CTnum, "ceh", "CT" )
    if( CTnum >= 19 )
    {
        random_player = CTplayers[ random( CTnum ) ]
        get_user_name( random_player, name, charsmax( name ) )
        client_print( 0, print_chat, "[Info] Second Terrorist is randomly added: %s", name )
        cs_set_user_team( random_player, CS_TEAM_T )
        if( CTnum >= 29 )
        {
            random_player = CTplayers[ random( CTnum ) ]
            get_user_name( random_player, name, charsmax( name ) )
            client_print( 0, print_chat, "[Info] Third Terrorist is randomly added: %s", name )
            cs_set_user_team( random_player, CS_TEAM_T )
        }
    }

}
if ct players are 19 (meaning and 1 terror from your current plugin), it will add second TR. if there are 29 CTs and + 1 your TR, then it will add 2 more players in TR team
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 02-20-2023 at 03:52.
JocAnis is offline