-
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.
Changed vudclear meds + added shakhed belt
- Loading branch information
1 parent
8853120
commit f7ae5d5
Showing
8 changed files
with
119 additions
and
5 deletions.
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
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,45 @@ | ||
using System; | ||
using System.Linq; | ||
using CommandSystem; | ||
using Exiled.API.Features; | ||
|
||
namespace VeryUsualDay.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
public class Shakhed : ICommand | ||
{ | ||
public string Command => "shakhed"; | ||
public string[] Aliases => new string[] { }; | ||
public string Description => "Для FX. Надевает/снимает с игрока пояс шахида. Использование: shakhed [id]"; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!VeryUsualDay.Instance.IsEnabledInRound) | ||
{ | ||
response = "Режим FX не включён!"; | ||
return false; | ||
} | ||
if (arguments.Count != 1) | ||
{ | ||
response = "Использование: shakhed [id]"; | ||
return false; | ||
} | ||
var args = arguments.ToArray(); | ||
if (!Player.TryGet(args[0], out var player)) | ||
{ | ||
response = "Не удалось найти игрока."; | ||
return false; | ||
} | ||
|
||
if (VeryUsualDay.Instance.Shakheds.Contains(player.Id)) | ||
{ | ||
VeryUsualDay.Instance.Shakheds.Remove(player.Id); | ||
response = "Игрок больше не носит шахид-пояс!"; | ||
return true; | ||
} | ||
VeryUsualDay.Instance.Shakheds.Add(player.Id); | ||
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.Enums; | ||
using Exiled.API.Features; | ||
|
||
namespace VeryUsualDay.Commands | ||
{ | ||
[CommandHandler(typeof(ClientCommandHandler))] | ||
public class ShakhedBoom : ICommand | ||
{ | ||
public string Command => "boom"; | ||
public string[] Aliases => new string[] { }; | ||
public string Description => "Для Foundation-X. Позволяет взорваться, если на вас пояс шахида."; | ||
|
||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
if (!VeryUsualDay.Instance.IsEnabledInRound) | ||
{ | ||
response = "Режим FX не включён!"; | ||
return false; | ||
} | ||
|
||
var playerSender = Player.Get(sender); | ||
if (!VeryUsualDay.Instance.Shakheds.Contains(playerSender.Id)) | ||
{ | ||
response = "Вы не носите пояс шахида."; | ||
return false; | ||
} | ||
playerSender.Explode(ProjectileType.FragGrenade, playerSender); | ||
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
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
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