mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-09 21:39:56 -05:00
add warn event
add alert to IW4ScriptCommands
This commit is contained in:
@ -11,23 +11,35 @@ WaitForCommand()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
command = getDvar("sv_iw4madmin_command");
|
||||
commandArgs = strtok(getDvar("sv_iw4madmin_commandargs"), ",");
|
||||
commandInfo = strtok(getDvar("sv_iw4madmin_command"), ";");
|
||||
command = commandInfo[0];
|
||||
commandArgs = strtok(commandInfo[1], ",");
|
||||
|
||||
switch(command)
|
||||
{
|
||||
case "balance":
|
||||
BalanceTeams(commandArgs);
|
||||
break;
|
||||
case "alert":
|
||||
//clientId alertType sound message
|
||||
SendAlert(commandArgs[0], commandArgs[1], commandArgs[2], commandArgs[3]);
|
||||
break;
|
||||
}
|
||||
|
||||
setDvar("sv_iw4madmin_command", "");
|
||||
setDvar("sv_iw4madmin_commandargs", "");
|
||||
|
||||
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)
|
||||
{
|
||||
if (isRoundBased())
|
||||
|
Reference in New Issue
Block a user