add warn event
add alert to IW4ScriptCommands
This commit is contained in:
parent
e77ef69ee8
commit
20d4ab27d3
14
Plugins/IW4ScriptCommands/CommandInfo.cs
Normal file
14
Plugins/IW4ScriptCommands/CommandInfo.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace IW4ScriptCommands
|
||||||
|
{
|
||||||
|
class CommandInfo
|
||||||
|
{
|
||||||
|
public string Command { get; set; }
|
||||||
|
public int ClientNumber { get; set; }
|
||||||
|
public List<string> CommandArguments { get; set; } = new List<string>();
|
||||||
|
public override string ToString() => $"{Command};{ClientNumber},{string.Join(',', CommandArguments)}";
|
||||||
|
}
|
||||||
|
}
|
@ -1,197 +1,197 @@
|
|||||||
using SharedLibraryCore;
|
//using SharedLibraryCore;
|
||||||
using SharedLibraryCore.Objects;
|
//using SharedLibraryCore.Objects;
|
||||||
using System;
|
//using System;
|
||||||
using System.Collections.Generic;
|
//using System.Collections.Generic;
|
||||||
using System.Linq;
|
//using System.Linq;
|
||||||
using System.Text;
|
//using System.Text;
|
||||||
using System.Threading.Tasks;
|
//using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace IW4ScriptCommands.Commands
|
//namespace IW4ScriptCommands.Commands
|
||||||
{
|
//{
|
||||||
class Balance : Command
|
// class Balance : Command
|
||||||
{
|
// {
|
||||||
private class TeamAssignment
|
// private class TeamAssignment
|
||||||
{
|
// {
|
||||||
public IW4MAdmin.Plugins.Stats.IW4Info.Team CurrentTeam { get; set; }
|
// public IW4MAdmin.Plugins.Stats.IW4Info.Team CurrentTeam { get; set; }
|
||||||
public int Num { get; set; }
|
// public int Num { get; set; }
|
||||||
public IW4MAdmin.Plugins.Stats.Models.EFClientStatistics Stats { get; set; }
|
// public IW4MAdmin.Plugins.Stats.Models.EFClientStatistics Stats { get; set; }
|
||||||
}
|
// }
|
||||||
public Balance() : base("balance", "balance teams", "bal", Player.Permission.Trusted, false, null)
|
// public Balance() : base("balance", "balance teams", "bal", Player.Permission.Trusted, false, null)
|
||||||
{
|
// {
|
||||||
}
|
// }
|
||||||
|
|
||||||
public override async Task ExecuteAsync(GameEvent E)
|
// public override async Task ExecuteAsync(GameEvent E)
|
||||||
{
|
// {
|
||||||
string teamsString = (await E.Owner.GetDvarAsync<string>("sv_iw4madmin_teams")).Value;
|
// string teamsString = (await E.Owner.GetDvarAsync<string>("sv_iw4madmin_teams")).Value;
|
||||||
|
|
||||||
var scriptClientTeams = teamsString.Split(';', StringSplitOptions.RemoveEmptyEntries)
|
// var scriptClientTeams = teamsString.Split(';', StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Select(c => c.Split(','))
|
// .Select(c => c.Split(','))
|
||||||
.Select(c => new TeamAssignment()
|
// .Select(c => new TeamAssignment()
|
||||||
{
|
// {
|
||||||
CurrentTeam = (IW4MAdmin.Plugins.Stats.IW4Info.Team)Enum.Parse(typeof(IW4MAdmin.Plugins.Stats.IW4Info.Team), c[1]),
|
// CurrentTeam = (IW4MAdmin.Plugins.Stats.IW4Info.Team)Enum.Parse(typeof(IW4MAdmin.Plugins.Stats.IW4Info.Team), c[1]),
|
||||||
Num = E.Owner.Players.FirstOrDefault(p => p?.NetworkId == c[0].ConvertLong())?.ClientNumber ?? -1,
|
// Num = E.Owner.Players.FirstOrDefault(p => p?.NetworkId == c[0].ConvertLong())?.ClientNumber ?? -1,
|
||||||
Stats = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(E.Owner.Players.FirstOrDefault(p => p?.NetworkId == c[0].ConvertLong()).ClientId, E.Owner.GetHashCode())
|
// Stats = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(E.Owner.Players.FirstOrDefault(p => p?.NetworkId == c[0].ConvertLong()).ClientId, E.Owner.GetHashCode())
|
||||||
})
|
// })
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
// at least one team is full so we can't balance
|
// // at least one team is full so we can't balance
|
||||||
if (scriptClientTeams.Count(ct => ct.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis) >= Math.Floor(E.Owner.MaxClients / 2.0)
|
// if (scriptClientTeams.Count(ct => ct.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis) >= Math.Floor(E.Owner.MaxClients / 2.0)
|
||||||
|| scriptClientTeams.Count(ct => ct.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies) >= Math.Floor(E.Owner.MaxClients / 2.0))
|
// || scriptClientTeams.Count(ct => ct.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies) >= Math.Floor(E.Owner.MaxClients / 2.0))
|
||||||
{
|
// {
|
||||||
await E.Origin?.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BALANCE_FAIL"]);
|
// await E.Origin?.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BALANCE_FAIL"]);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<string> teamAssignments = new List<string>();
|
// List<string> teamAssignments = new List<string>();
|
||||||
|
|
||||||
var activeClients = E.Owner.GetPlayersAsList().Select(c => new TeamAssignment()
|
// var activeClients = E.Owner.GetPlayersAsList().Select(c => new TeamAssignment()
|
||||||
{
|
// {
|
||||||
Num = c.ClientNumber,
|
// Num = c.ClientNumber,
|
||||||
Stats = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(c.ClientId, E.Owner.GetHashCode()),
|
// Stats = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(c.ClientId, E.Owner.GetHashCode()),
|
||||||
CurrentTeam = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(c.ClientId, E.Owner.GetHashCode()).Team
|
// CurrentTeam = IW4MAdmin.Plugins.Stats.Plugin.Manager.GetClientStats(c.ClientId, E.Owner.GetHashCode()).Team
|
||||||
})
|
// })
|
||||||
.Where(c => scriptClientTeams.FirstOrDefault(sc => sc.Num == c.Num)?.CurrentTeam != IW4MAdmin.Plugins.Stats.IW4Info.Team.Spectator)
|
// .Where(c => scriptClientTeams.FirstOrDefault(sc => sc.Num == c.Num)?.CurrentTeam != IW4MAdmin.Plugins.Stats.IW4Info.Team.Spectator)
|
||||||
.Where(c => c.CurrentTeam != scriptClientTeams.FirstOrDefault(p => p.Num == c.Num)?.CurrentTeam)
|
// .Where(c => c.CurrentTeam != scriptClientTeams.FirstOrDefault(p => p.Num == c.Num)?.CurrentTeam)
|
||||||
.OrderByDescending(c => c.Stats.Performance)
|
// .OrderByDescending(c => c.Stats.Performance)
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
var alliesTeam = scriptClientTeams
|
// var alliesTeam = scriptClientTeams
|
||||||
.Where(c => c.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies)
|
// .Where(c => c.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies)
|
||||||
.Where(c => activeClients.Count(t => t.Num == c.Num) == 0)
|
// .Where(c => activeClients.Count(t => t.Num == c.Num) == 0)
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
var axisTeam = scriptClientTeams
|
// var axisTeam = scriptClientTeams
|
||||||
.Where(c => c.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis)
|
// .Where(c => c.CurrentTeam == IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis)
|
||||||
.Where(c => activeClients.Count(t => t.Num == c.Num) == 0)
|
// .Where(c => activeClients.Count(t => t.Num == c.Num) == 0)
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
while (activeClients.Count() > 0)
|
// while (activeClients.Count() > 0)
|
||||||
{
|
// {
|
||||||
int teamSizeDifference = alliesTeam.Count - axisTeam.Count;
|
// int teamSizeDifference = alliesTeam.Count - axisTeam.Count;
|
||||||
double performanceDisparity = alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0 -
|
// double performanceDisparity = alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0 -
|
||||||
axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0;
|
// axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0;
|
||||||
|
|
||||||
if (teamSizeDifference == 0)
|
// if (teamSizeDifference == 0)
|
||||||
{
|
// {
|
||||||
if (performanceDisparity == 0)
|
// if (performanceDisparity == 0)
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(activeClients.First());
|
// alliesTeam.Add(activeClients.First());
|
||||||
activeClients.RemoveAt(0);
|
// activeClients.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (performanceDisparity > 0)
|
// if (performanceDisparity > 0)
|
||||||
{
|
// {
|
||||||
axisTeam.Add(activeClients.First());
|
// axisTeam.Add(activeClients.First());
|
||||||
activeClients.RemoveAt(0);
|
// activeClients.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(activeClients.First());
|
// alliesTeam.Add(activeClients.First());
|
||||||
activeClients.RemoveAt(0);
|
// activeClients.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if (teamSizeDifference > 0)
|
// else if (teamSizeDifference > 0)
|
||||||
{
|
// {
|
||||||
if (performanceDisparity > 0)
|
// if (performanceDisparity > 0)
|
||||||
{
|
// {
|
||||||
axisTeam.Add(activeClients.First());
|
// axisTeam.Add(activeClients.First());
|
||||||
activeClients.RemoveAt(0);
|
// activeClients.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
axisTeam.Add(activeClients.Last());
|
// axisTeam.Add(activeClients.Last());
|
||||||
activeClients.RemoveAt(activeClients.Count - 1);
|
// activeClients.RemoveAt(activeClients.Count - 1);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (performanceDisparity > 0)
|
// if (performanceDisparity > 0)
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(activeClients.First());
|
// alliesTeam.Add(activeClients.First());
|
||||||
activeClients.RemoveAt(0);
|
// activeClients.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(activeClients.Last());
|
// alliesTeam.Add(activeClients.Last());
|
||||||
activeClients.RemoveAt(activeClients.Count - 1);
|
// activeClients.RemoveAt(activeClients.Count - 1);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
alliesTeam = alliesTeam.OrderByDescending(t => t.Stats.Performance)
|
// alliesTeam = alliesTeam.OrderByDescending(t => t.Stats.Performance)
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
axisTeam = axisTeam.OrderByDescending(t => t.Stats.Performance)
|
// axisTeam = axisTeam.OrderByDescending(t => t.Stats.Performance)
|
||||||
.ToList();
|
// .ToList();
|
||||||
|
|
||||||
while (Math.Abs(alliesTeam.Count - axisTeam.Count) > 1)
|
// while (Math.Abs(alliesTeam.Count - axisTeam.Count) > 1)
|
||||||
{
|
// {
|
||||||
int teamSizeDifference = alliesTeam.Count - axisTeam.Count;
|
// int teamSizeDifference = alliesTeam.Count - axisTeam.Count;
|
||||||
double performanceDisparity = alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0 -
|
// double performanceDisparity = alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0 -
|
||||||
axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0;
|
// axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0;
|
||||||
|
|
||||||
if (teamSizeDifference > 0)
|
// if (teamSizeDifference > 0)
|
||||||
{
|
// {
|
||||||
if (performanceDisparity > 0)
|
// if (performanceDisparity > 0)
|
||||||
{
|
// {
|
||||||
axisTeam.Add(alliesTeam.First());
|
// axisTeam.Add(alliesTeam.First());
|
||||||
alliesTeam.RemoveAt(0);
|
// alliesTeam.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
axisTeam.Add(alliesTeam.Last());
|
// axisTeam.Add(alliesTeam.Last());
|
||||||
alliesTeam.RemoveAt(axisTeam.Count - 1);
|
// alliesTeam.RemoveAt(axisTeam.Count - 1);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (performanceDisparity > 0)
|
// if (performanceDisparity > 0)
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(axisTeam.Last());
|
// alliesTeam.Add(axisTeam.Last());
|
||||||
axisTeam.RemoveAt(axisTeam.Count - 1);
|
// axisTeam.RemoveAt(axisTeam.Count - 1);
|
||||||
}
|
// }
|
||||||
|
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
alliesTeam.Add(axisTeam.First());
|
// alliesTeam.Add(axisTeam.First());
|
||||||
axisTeam.RemoveAt(0);
|
// axisTeam.RemoveAt(0);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach (var assignment in alliesTeam)
|
// foreach (var assignment in alliesTeam)
|
||||||
{
|
// {
|
||||||
teamAssignments.Add($"{assignment.Num},2");
|
// teamAssignments.Add($"{assignment.Num},2");
|
||||||
assignment.Stats.Team = IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies;
|
// assignment.Stats.Team = IW4MAdmin.Plugins.Stats.IW4Info.Team.Allies;
|
||||||
}
|
// }
|
||||||
foreach (var assignment in axisTeam)
|
// foreach (var assignment in axisTeam)
|
||||||
{
|
// {
|
||||||
teamAssignments.Add($"{assignment.Num},3");
|
// teamAssignments.Add($"{assignment.Num},3");
|
||||||
assignment.Stats.Team = IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis;
|
// assignment.Stats.Team = IW4MAdmin.Plugins.Stats.IW4Info.Team.Axis;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (alliesTeam.Count(ac => scriptClientTeams.First(sc => sc.Num == ac.Num).CurrentTeam != ac.CurrentTeam) == 0 &&
|
// if (alliesTeam.Count(ac => scriptClientTeams.First(sc => sc.Num == ac.Num).CurrentTeam != ac.CurrentTeam) == 0 &&
|
||||||
axisTeam.Count(ac => scriptClientTeams.First(sc => sc.Num == ac.Num).CurrentTeam != ac.CurrentTeam) == 0)
|
// axisTeam.Count(ac => scriptClientTeams.First(sc => sc.Num == ac.Num).CurrentTeam != ac.CurrentTeam) == 0)
|
||||||
{
|
// {
|
||||||
await E.Origin.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BALANCE_FAIL_BALANCED"]);
|
// await E.Origin.Tell(Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_BALANCE_FAIL_BALANCED"]);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (E.Origin?.Level > Player.Permission.Administrator)
|
// if (E.Origin?.Level > Player.Permission.Administrator)
|
||||||
{
|
// {
|
||||||
await E.Origin.Tell($"Allies Elo: {(alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0)}");
|
// await E.Origin.Tell($"Allies Elo: {(alliesTeam.Count > 0 ? alliesTeam.Average(t => t.Stats.Performance) : 0)}");
|
||||||
await E.Origin.Tell($"Axis Elo: {(axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0)}");
|
// await E.Origin.Tell($"Axis Elo: {(axisTeam.Count > 0 ? axisTeam.Average(t => t.Stats.Performance) : 0)}");
|
||||||
}
|
// }
|
||||||
|
|
||||||
string args = string.Join(",", teamAssignments);
|
// string args = string.Join(",", teamAssignments);
|
||||||
await E.Owner.ExecuteCommandAsync($"sv_iw4madmin_command \"balance:{args}\"");
|
// await E.Owner.ExecuteCommandAsync($"sv_iw4madmin_command \"balance:{args}\"");
|
||||||
await E.Origin.Tell("Balance command sent");
|
// await E.Origin.Tell("Balance command sent");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
@ -17,14 +17,29 @@ namespace IW4ScriptCommands
|
|||||||
|
|
||||||
public Task OnEventAsync(GameEvent E, Server S)
|
public Task OnEventAsync(GameEvent E, Server S)
|
||||||
{
|
{
|
||||||
if (E.Type == GameEvent.EventType.JoinTeam || E.Type == GameEvent.EventType.Disconnect)
|
//if (E.Type == GameEvent.EventType.JoinTeam || E.Type == GameEvent.EventType.Disconnect)
|
||||||
|
//{
|
||||||
|
// E.Origin = new SharedLibraryCore.Objects.Player()
|
||||||
|
// {
|
||||||
|
// ClientId = 1,
|
||||||
|
// CurrentServer = E.Owner
|
||||||
|
// };
|
||||||
|
// return new Commands.Balance().ExecuteAsync(E);
|
||||||
|
//}
|
||||||
|
|
||||||
|
if (E.Type == GameEvent.EventType.Warn)
|
||||||
{
|
{
|
||||||
E.Origin = new SharedLibraryCore.Objects.Player()
|
return S.SetDvarAsync("sv_iw4madmin_command", new CommandInfo()
|
||||||
{
|
{
|
||||||
ClientId = 1,
|
ClientNumber = E.Target.ClientNumber,
|
||||||
CurrentServer = E.Owner
|
Command = "alert",
|
||||||
};
|
CommandArguments = new List<string>()
|
||||||
return new Commands.Balance().ExecuteAsync(E);
|
{
|
||||||
|
"Warning",
|
||||||
|
"ui_mp_nukebomb_timer",
|
||||||
|
E.Data
|
||||||
|
}
|
||||||
|
}.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
@ -70,7 +70,20 @@ namespace SharedLibraryCore.Commands
|
|||||||
if (E.Origin.Level <= E.Target.Level)
|
if (E.Origin.Level <= E.Target.Level)
|
||||||
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_WARN_FAIL"]} {E.Target.Name}");
|
await E.Origin.Tell($"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_WARN_FAIL"]} {E.Target.Name}");
|
||||||
else
|
else
|
||||||
|
{
|
||||||
await E.Target.Warn(E.Data, E.Origin);
|
await E.Target.Warn(E.Data, E.Origin);
|
||||||
|
|
||||||
|
var e = new GameEvent()
|
||||||
|
{
|
||||||
|
Type = GameEvent.EventType.Warn,
|
||||||
|
Data = E.Data,
|
||||||
|
Origin = E.Origin,
|
||||||
|
Target = E.Target,
|
||||||
|
Owner = E.Owner
|
||||||
|
};
|
||||||
|
|
||||||
|
E.Owner.Manager.GetEventHandler().AddEvent(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ namespace SharedLibraryCore
|
|||||||
|
|
||||||
// events "generated" by clients
|
// events "generated" by clients
|
||||||
Say,
|
Say,
|
||||||
|
Warn,
|
||||||
Report,
|
Report,
|
||||||
Flag,
|
Flag,
|
||||||
Unflag,
|
Unflag,
|
||||||
|
@ -11,23 +11,35 @@ WaitForCommand()
|
|||||||
{
|
{
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
command = getDvar("sv_iw4madmin_command");
|
commandInfo = strtok(getDvar("sv_iw4madmin_command"), ";");
|
||||||
commandArgs = strtok(getDvar("sv_iw4madmin_commandargs"), ",");
|
command = commandInfo[0];
|
||||||
|
commandArgs = strtok(commandInfo[1], ",");
|
||||||
|
|
||||||
switch(command)
|
switch(command)
|
||||||
{
|
{
|
||||||
case "balance":
|
case "balance":
|
||||||
BalanceTeams(commandArgs);
|
BalanceTeams(commandArgs);
|
||||||
break;
|
break;
|
||||||
|
case "alert":
|
||||||
|
//clientId alertType sound message
|
||||||
|
SendAlert(commandArgs[0], commandArgs[1], commandArgs[2], commandArgs[3]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setDvar("sv_iw4madmin_command", "");
|
setDvar("sv_iw4madmin_command", "");
|
||||||
setDvar("sv_iw4madmin_commandargs", "");
|
|
||||||
|
|
||||||
wait(1);
|
wait(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendAlert(clientId, alertType, sound, message)
|
||||||
|
{
|
||||||
|
client = level.players[int(clientId)];
|
||||||
|
|
||||||
|
client thread playLeaderDialogOnPlayer(sound, client.team);
|
||||||
|
client playLocalSound(sound);
|
||||||
|
client iPrintLnBold("^1" + alertType + ": ^3" + message);
|
||||||
|
}
|
||||||
|
|
||||||
BalanceTeams(commandArgs)
|
BalanceTeams(commandArgs)
|
||||||
{
|
{
|
||||||
if (isRoundBased())
|
if (isRoundBased())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user