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:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user