1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

added top player stats

fix for some commands returning multiple matches found when target not required
This commit is contained in:
RaidMax
2018-05-28 20:30:31 -05:00
parent 045260c648
commit ebda1984fa
137 changed files with 426 additions and 41 deletions

View File

@ -12,19 +12,45 @@ WaitForCommand()
for(;;)
{
command = getDvar("sv_iw4madmin_command");
commandArgs = strtok(getDvar("sv_iw4madmin_commandargs"), ",");
switch(command)
{
case "balance":
if (isRoundBased())
{
iPrintLnBold("Balancing Teams..");
level maps\mp\gametypes\_teams::balanceTeams();
}
BalanceTeams(commandArgs);
break;
}
setDvar("sv_iw4madmin_command", "");
setDvar("sv_iw4madmin_commandargs", "");
wait(1);
}
}
BalanceTeams(commandArgs)
{
if (isRoundBased())
{
iPrintLnBold("Balancing Teams..");
for (i = 0; i < commandArgs.size; i+= 2)
{
newTeam = i + 1 = "1" ? axis : allies;
player = level.players[i];
if (!isPlayer(player))
continue;
switch (newTeam)
{
case "axis":
player[[level.axis]]();
break;
case "allies":
player[[level.allies]]();
break;
}
}
}
}