Ejemplo n.º 1
0
        public void Execute(IRocketPlayer caller, string[] args)
        {
            if (args.Length != 1 || !byte.TryParse(args[0], out byte kit) || kit >= GunGameConfig.instance.weapons.weapons.Length)
            {
                throw new GunGameException(EExceptionType.INVALID_ARGS);
            }

            GunGamePlayerComponent p = ((UnturnedPlayer)caller).GunGamePlayer();

            p.ClearItems();
            p.GiveKit(kit);
            p.currentWeapon = kit;
            GunGame.Say(caller, "kit", Color.green, kit);
        }