Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ChinaBlueSky.Roles
- {
- using System;
- using System.Collections.Generic;
- using ChinaBlueSky.Api;
- using CommandSystem;
- using Exiled.API.Features;
- using Exiled.CustomItems.API.Features;
- using Exiled.CustomRoles.API.Features;
- [CommandHandler(typeof(ClientCommandHandler))]
- class ComandoCfg : ICommand
- {
- public string Command => ("cd");
- public string[] Aliases => null;
- public string Description => "";
- public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
- {
- var ply = Player.Get(sender);
- var scp1325 = CustomRole.Get(1325);
- var scp13251 = CustomRole.Get(13251);
- bool isScp1325 = scp1325.Check(ply);
- bool isScp13251 = scp13251.Check(ply);
- if (isScp13251)
- {
- if (!Scp1325Item.Scp13251Cooldown.TryGetValue(ply, out var cooldown))
- {
- response = "error";
- return true;
- }
- if (cooldown > 1)
- {
- response = $"u need wait {cooldown} s";
- return true;
- }
- ply.SetCustomRank("", "default");
- Scp1325Item.Scps13251.Remove(ply);
- Scp1325Item.Scp13251Cooldown.Remove(ply);
- scp1325.AddRole(ply);
- response = "u are Scp-1325 now!";
- return true;
- }
- if (isScp1325)
- {
- if (!Scp1325Role.Delay.TryGetValue(ply, out var cooldown))
- {
- response = "error";
- return true;
- }
- if (cooldown > 1)
- {
- response = $"Need wait {cooldown} s";
- return true;
- }
- var randomList = new List<ItemType>
- {
- ItemType.Medkit,
- ItemType.Adrenaline,
- ItemType.Painkillers
- };
- var item = ply.AddItem(randomList[Plugin.Random.Next(0, randomList.Count)]);
- CustomItem.Get(1325).TrackedSerials.Add(item.Serial);
- Scp1325Role.Delay[ply] = 120;
- response = $"done";
- return true;
- }
- response = "u can not use this command.";
- return true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement