Beispiel #1
0
        public static void OnShutdown()
        {
            foreach (SteamPlayer player in Provider.clients)
            {
                ulong id = player.playerID.steamID.m_SteamID;
                GunGamePlayerComponent p = id.GetPlayer().GunGamePlayer();

                if (GunGame.IsMySqlEnabled)
                {
                    SQLManager.SavePlayer(id, p.data);
                }
            }
        }
Beispiel #2
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);
        }