Raised This Month: $29 Target: $400
 7% 

Jailbreak MaxCt 1
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>

#define PLUGIN "TeamCt Max 1"
#define VERSION "1.0"
#define AUTHOR "KilLeR MeN =)"

new pCTLimit

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd ( "chooseteam" , "Switch_Teams" )
register_clcmd ( "join" , "Switch_Teams" )

pCTLimit = register_cvar ( "amx_ct_limit" , "1" )

server_cmd ( "humans_join_team ^"t^"" )
}

public Switch_Teams ( id )
{
new numCTs = countCTs ()

if ( numCTs >= get_pcvar_num ( pCTLimit ) )
cs_set_user_team ( id , CS_TEAM_T)
else
cs_set_user_team ( id , CS_TEAM_CT)
}
public countCTs ()
{
new returnVal = 0

for ( new i = 0 ; i < get_maxplayers () ; i++ )
{
if ( !is_user_connected ( i ) )
continue

new TeamName[3]
get_user_team ( i , TeamName , 2 )

if ( TeamName[0] == 'C' )
returnVal++
}

return returnVal
}
This album does not have any pictures.

All times are GMT -4. The time now is 17:17.


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