Exemple #1
0
 void cmdChatSkin(BasePlayer player, string command, string[] args)
 {
     if (args.Length == 1)
     {
         var option = args[0];
         if (option == "on" || !PlayersActivated.Contains(player.userID))
         {
             PlayersActivated.Add(player.userID);
             ItemSkinsCommand(player, true);
             SendReply(player, Messages["skinsOn"]);
         }
         else
         if (option == "off" || PlayersActivated.Contains(player.userID))
         {
             PlayersActivated.Remove(player.userID);
             ItemSkinsCommand(player, false);
             SendReply(player, Messages["skinsOff"]);
         }
         return;
     }
     if (!PlayersActivated.Contains(player.userID))
     {
         SendReply(player, Messages["skinsCurrentlyDisabled"]);
         return;
     }
     timer.Once(0.1f, () =>
     {
         StorageBox.Create(this, player, boxTitle, 18);
         var sb = StorageBox.AddComponent <SkinBox>(this, player);
         boxes.Add(sb, player);
         sb.Init(player);
         StorageBox.StartLooting(this, player);
     });
 }
Exemple #2
0
 void OpenBox(BasePlayer player, uint cupboardId)
 {
     timer.Once(0.1f, () =>
     {
         StorageBox.Create(this, player, boxCaption, 18);
         var sb = StorageBox.AddComponent <CupboardBox>(this, player);
         boxes.Add(sb, player);
         sb.Init(player, cupboardId);
         StorageBox.StartLooting(this, player);
     });
 }