Example #1
0
        public static void Loot(LootItem loot)
        {
            if (loot != null)
            {
                if (loot.Item.Type == ItemType.Money)
                {
                    var notification = Notification.Loot("Looted GTA$" + loot.Item.MoneyValue.ToString("N0"));
                    notification.Tracking = loot.Item.MoneyValue;
                    RPG.Notify(notification);
                    PlayerData.AddMoney(loot.Item.MoneyValue);
                    loot.Destroy();
                    Game.PlaySound("FocusOut", "HintCamSounds");
                }
                else
                {
                    RPG.Notify(Notification.Loot("Looted: " + loot.Name + " x" + loot.Item.Quantity));
                    PlayerData.AddItem(loot.Item);
                    loot.Destroy();
                    Game.PlaySound("FocusOut", "HintCamSounds");
                }
            }

            RPGInfo.NearbyLoot = null;
        }