-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca8b47c
commit 2b5d000
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Linq; | ||
using CommandSystem; | ||
using Exiled.API.Features; | ||
|
||
namespace VeryUsualDay.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
public class AShield : ICommand | ||
{ | ||
public string Command => "ashield"; | ||
public string[] Aliases => null; | ||
public string Description => "Использование: ashield id float. Добавляет scp shield игроку."; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!VeryUsualDay.Instance.IsEnabledInRound) | ||
{ | ||
response = "Режим FX не включён!"; | ||
return false; | ||
} | ||
|
||
var args = arguments.ToArray(); | ||
if (!Player.TryGet(args[0], out var player)) | ||
{ | ||
response = "Не удалось найти игрока."; | ||
return false; | ||
} | ||
|
||
player.HumeShield = float.Parse(args[1]); | ||
response = "Успешно установлено."; | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Linq; | ||
using CommandSystem; | ||
using Exiled.API.Features; | ||
|
||
namespace VeryUsualDay.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
public class HShield : ICommand | ||
{ | ||
public string Command => "hshield"; | ||
public string[] Aliases => null; | ||
public string Description => "Использование: hshield id float. Добавляет human shield игроку."; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!VeryUsualDay.Instance.IsEnabledInRound) | ||
{ | ||
response = "Режим FX не включён!"; | ||
return false; | ||
} | ||
|
||
var args = arguments.ToArray(); | ||
if (!Player.TryGet(args[0], out var player)) | ||
{ | ||
response = "Не удалось найти игрока."; | ||
return false; | ||
} | ||
|
||
player.AddAhp(float.Parse(args[1]), float.Parse(args[1]), 0f, 1f); | ||
response = "Успешно добавлено."; | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters