mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-11-05 04:17:04 +00:00
chat_command_balance_teams 1.0.0
This commit is contained in:
32
chat_commands/chat_command_balance_teams.gsc
Normal file
32
chat_commands/chat_command_balance_teams.gsc
Normal file
@@ -0,0 +1,32 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user