Add Rubbellos without function, add message /giveitem, add UseItem variable
This commit is contained in:
27
ReallifeGamemode.Server/Inventory/Items/UseItem.cs
Normal file
27
ReallifeGamemode.Server/Inventory/Items/UseItem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class UseItem : IUsableItem
|
||||
{
|
||||
public abstract int Id { get; }
|
||||
public abstract string Name { get; }
|
||||
public abstract string Description { get; }
|
||||
public abstract int Gewicht { get; }
|
||||
public abstract string Einheit { get; }
|
||||
public abstract uint Object { get; }
|
||||
public abstract int Price { get; }
|
||||
|
||||
public void Use(UserItem uItem)
|
||||
{
|
||||
Player player = uItem.GetUser().Player;
|
||||
|
||||
player.SendNotification("Du hast ~g~" + " ~y~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~verwendet.", false);
|
||||
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user