-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSeShowTag.cs
More file actions
38 lines (32 loc) · 1.21 KB
/
SeShowTag.cs
File metadata and controls
38 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Linq;
using CommandSystem;
using Exiled.API.Features;
using RemoteAdmin;
using ScriptedEvents.API.Features;
namespace ScriptedEvents.Commands
{
[CommandHandler(typeof(ClientCommandHandler))]
public class SeShowTag : ICommand
{
/// <inheritdoc/>
public string Command => "seshowtag";
/// <inheritdoc/>
public string[] Aliases => new[] { "sstag", "sst" };
/// <inheritdoc/>
public string Description => "Shows a custom SE rank if youre an SE contributor.";
public bool SanitizeResponse => true;
/// <inheritdoc/>
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
if (sender is PlayerCommandSender player)
{
bool res = CreditHandler.AddCreditTagIfApplicable(Player.List.FirstOrDefault(p => p.Id == player.PlayerId));
response = "Applying tag " + (res ? "successful!" : "failed, youre not a contributor or you already have a different rank.");
return true;
}
response = "You must be a player to use this command.";
return false;
}
}
}