mirror of
				https://github.com/Resxt/Plutonium-IW5-Scripts.git
				synced 2025-10-31 01:46:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			547 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			547 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #include scripts\chat_commands;
 | |
| 
 | |
| Init()
 | |
| {   
 | |
|     CreateCommand(level.chat_commands["ports"], "balanceteams", "function", ::BalanceTeamsCommand, 3, [], ["bt"]);
 | |
| }
 | |
| 
 | |
| 
 | |
| 
 | |
| /* Command section */
 | |
| 
 | |
| BalanceTeamsCommand(args)
 | |
| {
 | |
|     BalanceTeams();
 | |
| }
 | |
| 
 | |
| 
 | |
| 
 | |
| /* Logic section */
 | |
| 
 | |
| BalanceTeams()
 | |
| {
 | |
|     if (!maps\mp\gametypes\_teams::getteambalance()) 
 | |
|     {
 | |
|         self thread TellPlayer(["Balancing teams"], 1);
 | |
|         level maps\mp\gametypes\_teams::balanceteams(); 
 | |
|     }
 | |
|     else
 | |
|     {
 | |
|         self thread TellPlayer(["Teams are already balanced"], 1);
 | |
|     }
 | |
| } |