Add Drop Item and Pick up item
This commit is contained in:
@@ -108,7 +108,7 @@ mp.events.add("removeItem", (userItemId, amount) => {
|
|||||||
arrIndex = i;
|
arrIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inventoryWeight -= parseInt(items[arrIndex][2]) * parseInt(items[arrIndex][3]);
|
inventoryWeight -= parseInt(items[arrIndex][2]) * amount;
|
||||||
items[arrIndex][3] -= amount;
|
items[arrIndex][3] -= amount;
|
||||||
if (items[arrIndex][3] === 0) {
|
if (items[arrIndex][3] === 0) {
|
||||||
items.splice(arrIndex, 1);
|
items.splice(arrIndex, 1);
|
||||||
@@ -500,6 +500,46 @@ mp.events.add('click', (x, y, upOrDown, leftOrRight, relativeX, relativeY, world
|
|||||||
var cX = x / screenX;
|
var cX = x / screenX;
|
||||||
var cY = y / screenY;
|
var cY = y / screenY;
|
||||||
|
|
||||||
|
//if (upOrDown === "down" && leftOrRight === "left") {
|
||||||
|
// clickTimeL = Date.now();
|
||||||
|
// if (mouseActive === false) {
|
||||||
|
// if (clickTimeR !== null && Date.now() - clickTimeR < 100) {
|
||||||
|
// mouseActive = true;
|
||||||
|
// mp.gui.cursor.show(true, true);
|
||||||
|
// clickTimeL = null;
|
||||||
|
// clickTimeR = null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// if (clickTimeR !== null && Date.now() - clickTimeR < 100) {
|
||||||
|
// mouseActive = false;
|
||||||
|
// mp.gui.cursor.show(false, false);
|
||||||
|
// clickTimeL = null;
|
||||||
|
// clickTimeR = null;
|
||||||
|
// } else {
|
||||||
|
// mp.gui.chat.push("~r~" + worldPosition.x.toFixed(3).toString() + ", ~g~" + worldPosition.y.toFixed(3).toString() + ", ~b~" + worldPosition.z.toFixed(3).toString());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//if (upOrDown === "down" && leftOrRight === "right") {
|
||||||
|
// clickTimeR = Date.now();
|
||||||
|
// if (mouseActive === false) {
|
||||||
|
// if (clickTimeL !== null && Date.now() - clickTimeL < 100) {
|
||||||
|
// mouseActive = true;
|
||||||
|
// mp.gui.cursor.show(true, true);
|
||||||
|
// clickTimeL = null;
|
||||||
|
// clickTimeR = null;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (clickTimeL !== null && Date.now() - clickTimeL < 100) {
|
||||||
|
// mouseActive = false;
|
||||||
|
// mp.gui.cursor.show(false, false);
|
||||||
|
// clickTimeL = null;
|
||||||
|
// clickTimeR = null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
if (show) {
|
if (show) {
|
||||||
//LINKE MAUSTASTE
|
//LINKE MAUSTASTE
|
||||||
//RUNTER
|
//RUNTER
|
||||||
@@ -592,7 +632,7 @@ mp.events.add('click', (x, y, upOrDown, leftOrRight, relativeX, relativeY, world
|
|||||||
itemRadial = true;
|
itemRadial = true;
|
||||||
hoverItem = null;
|
hoverItem = null;
|
||||||
dragItem = null;
|
dragItem = null;
|
||||||
clickTime = 0;
|
clickTime = null;
|
||||||
} else {
|
} else {
|
||||||
if (dragItem !== null) {
|
if (dragItem !== null) {
|
||||||
if (isMouseOverFreeSlot(x, y)) {
|
if (isMouseOverFreeSlot(x, y)) {
|
||||||
|
|||||||
1
Main.cs
1
Main.cs
@@ -4,6 +4,7 @@ using System.Linq;
|
|||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using reallife_gamemode.Model;
|
using reallife_gamemode.Model;
|
||||||
|
using reallife_gamemode.Server.Classes;
|
||||||
using reallife_gamemode.Server.Entities;
|
using reallife_gamemode.Server.Entities;
|
||||||
using reallife_gamemode.Server.Managers;
|
using reallife_gamemode.Server.Managers;
|
||||||
using reallife_gamemode.Server.Saves;
|
using reallife_gamemode.Server.Saves;
|
||||||
|
|||||||
16
Server/Classes/TempBlip.cs
Normal file
16
Server/Classes/TempBlip.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Classes
|
||||||
|
{
|
||||||
|
public class TempBlip
|
||||||
|
{
|
||||||
|
public byte Color { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public byte Transparency { get; set; }
|
||||||
|
public bool ShortRange { get; set; }
|
||||||
|
public uint Sprite { get; set; }
|
||||||
|
public float Scale { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@ using reallife_gamemode.Server.Inventory.Interfaces;
|
|||||||
using reallife_gamemode.Server.Saves;
|
using reallife_gamemode.Server.Saves;
|
||||||
using reallife_gamemode.Server.Business;
|
using reallife_gamemode.Server.Business;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using reallife_gamemode.Server.Classes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
||||||
@@ -1053,15 +1054,13 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
List<UserItem> userItems = context.UserItems.ToList().FindAll(i => i.UserId == target.GetUser().Id);
|
List<UserItem> userItems = context.UserItems.ToList().FindAll(i => i.UserId == target.GetUser().Id);
|
||||||
foreach(var uItem in userItems)
|
foreach(var uItem in userItems)
|
||||||
{
|
{
|
||||||
invWeight += uItem.Amount * InventoryManager.GetItemById(itemId).Gewicht;
|
invWeight += uItem.Amount * InventoryManager.GetItemById(uItem.ItemId).Gewicht;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
invWeight += amount * InventoryManager.GetItemById(itemId).Gewicht;
|
if (invWeight + (amount * InventoryManager.GetItemById(itemId).Gewicht) > 40000)
|
||||||
|
|
||||||
if (invWeight > 40000)
|
|
||||||
{
|
{
|
||||||
player.SendChatMessage("~y~" + targetname + " ~s~hat nicht mehr genug Platz in seinem Inventar.");
|
player.SendChatMessage("~y~" + target.Name + " ~s~hat nicht mehr genug Platz in seinem Inventar.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ using System.Text;
|
|||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using reallife_gamemode.Model;
|
using reallife_gamemode.Model;
|
||||||
|
using reallife_gamemode.Server.Classes;
|
||||||
using reallife_gamemode.Server.Entities;
|
using reallife_gamemode.Server.Entities;
|
||||||
using reallife_gamemode.Server.Extensions;
|
using reallife_gamemode.Server.Extensions;
|
||||||
|
using reallife_gamemode.Server.Inventory;
|
||||||
using reallife_gamemode.Server.Inventory.Interfaces;
|
using reallife_gamemode.Server.Inventory.Interfaces;
|
||||||
using reallife_gamemode.Server.Managers;
|
using reallife_gamemode.Server.Managers;
|
||||||
using reallife_gamemode.Server.Saves;
|
using reallife_gamemode.Server.Saves;
|
||||||
@@ -32,7 +34,9 @@ namespace reallife_gamemode.Server.Events
|
|||||||
SaveManager.OnSaveBlipData(player, tempBlip.Sprite.ToString(), tempBlip.Name, tempBlip.Scale.ToString(), tempBlip.Color.ToString(),
|
SaveManager.OnSaveBlipData(player, tempBlip.Sprite.ToString(), tempBlip.Name, tempBlip.Scale.ToString(), tempBlip.Color.ToString(),
|
||||||
tempBlip.Transparency.ToString(), 200.ToString(), tempBlip.ShortRange.ToString(), 0.ToString(), 0.ToString());
|
tempBlip.Transparency.ToString(), 200.ToString(), tempBlip.ShortRange.ToString(), 0.ToString(), 0.ToString());
|
||||||
player.SendNotification("~y~Blip~s~ erstellt!", false);
|
player.SendNotification("~y~Blip~s~ erstellt!", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GroundItem.PickUpGroundItem(player);
|
||||||
}
|
}
|
||||||
[RemoteEvent("keyPress:E")]
|
[RemoteEvent("keyPress:E")]
|
||||||
public void KeyPressE(Client player)
|
public void KeyPressE(Client player)
|
||||||
|
|||||||
111
Server/Inventory/GroundItem.cs
Normal file
111
Server/Inventory/GroundItem.cs
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using GTANetworkAPI;
|
||||||
|
using reallife_gamemode.Server.Inventory.Interfaces;
|
||||||
|
using reallife_gamemode.Server.Managers;
|
||||||
|
using System.Linq;
|
||||||
|
using reallife_gamemode.Server.Entities;
|
||||||
|
using reallife_gamemode.Server.Extensions;
|
||||||
|
using reallife_gamemode.Model;
|
||||||
|
|
||||||
|
namespace reallife_gamemode.Server.Inventory
|
||||||
|
{
|
||||||
|
public class GroundItem : Script
|
||||||
|
{
|
||||||
|
public int ItemId { get; set; }
|
||||||
|
public int Amount { get; set; }
|
||||||
|
public Vector3 Position { get; set; }
|
||||||
|
|
||||||
|
public static List<GroundItem> GroundItems = new List<GroundItem>();
|
||||||
|
public static List<GTANetworkAPI.Object> GroundObjects = new List<GTANetworkAPI.Object>();
|
||||||
|
public static List<TextLabel> GroundTextLabels = new List<TextLabel>();
|
||||||
|
|
||||||
|
public static void AddGroundItem(GroundItem grndItem, GTANetworkAPI.Object grndObject, TextLabel grndTextLabel)
|
||||||
|
{
|
||||||
|
GroundItems.Add(grndItem);
|
||||||
|
GroundObjects.Add(grndObject);
|
||||||
|
GroundTextLabels.Add(grndTextLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PickUpGroundItem(Client player)
|
||||||
|
{
|
||||||
|
GroundItem nearest = GroundItems.FirstOrDefault(d => d.Position.DistanceTo(player.Position) <= 1.2);
|
||||||
|
if (nearest != null)
|
||||||
|
{
|
||||||
|
var invWeight = InventoryManager.GetUserInventoryWeight(player);
|
||||||
|
var itemsToAdd = 0;
|
||||||
|
GTANetworkAPI.Object nearestObject = GroundObjects.FirstOrDefault(d => d.Position == nearest.Position);
|
||||||
|
TextLabel nearestTextLabel = GroundTextLabels.FirstOrDefault(d => d.Position == nearest.Position);
|
||||||
|
IItem nearestItem = InventoryManager.GetItemById(nearest.ItemId);
|
||||||
|
UserItem existingItem = InventoryManager.UserHasThisItem(player, nearest.ItemId);
|
||||||
|
var user = player.GetUser();
|
||||||
|
if (nearestItem.Gewicht * nearest.Amount + invWeight > 40000)
|
||||||
|
{
|
||||||
|
for(var i = 1; i <= nearest.Amount; i++)
|
||||||
|
{
|
||||||
|
if(invWeight + (i * nearestItem.Gewicht) > 40000)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
itemsToAdd = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(itemsToAdd < 1)
|
||||||
|
{
|
||||||
|
player.SendNotification("~r~Du hast keinen Platz im Inventar!", false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(existingItem != null)
|
||||||
|
{
|
||||||
|
using (var context = new DatabaseContext())
|
||||||
|
{
|
||||||
|
UserItem existingUserItem = context.UserItems.FirstOrDefault(i => i.Id == existingItem.Id);
|
||||||
|
existingUserItem.Amount += itemsToAdd;
|
||||||
|
context.SaveChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UserItem newItem = new UserItem { ItemId = nearest.ItemId, UserId = user.Id, Amount = nearest.Amount };
|
||||||
|
InventoryManager.AddItemToInventory(player, newItem);
|
||||||
|
}
|
||||||
|
nearestTextLabel.Text = nearestItem.Name + " ~s~(~y~" + (nearest.Amount - itemsToAdd) + "~s~)";
|
||||||
|
player.SendNotification("Du hast nur ~g~" + itemsToAdd + " ~y~" + nearestItem.Name + " aufgehoben.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (existingItem != null)
|
||||||
|
{
|
||||||
|
using (var context = new DatabaseContext())
|
||||||
|
{
|
||||||
|
UserItem existingUserItem = context.UserItems.FirstOrDefault(i => i.Id == existingItem.Id && i.UserId == user.Id);
|
||||||
|
existingUserItem.Amount += nearest.Amount;
|
||||||
|
context.SaveChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UserItem item = new UserItem() { ItemId = nearest.ItemId, UserId = user.Id, Amount = nearest.Amount };
|
||||||
|
InventoryManager.AddItemToInventory(player, item);
|
||||||
|
}
|
||||||
|
RemoveGroundItem(nearest, nearestObject, nearestTextLabel);
|
||||||
|
player.SendNotification("Du hast ~g~" + nearest.Amount + " ~y~" + nearestItem.Name + " aufgehoben.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RemoveGroundItem(GroundItem grndItem, GTANetworkAPI.Object grndObject, TextLabel grndTextLabel)
|
||||||
|
{
|
||||||
|
GroundItems.Remove(grndItem);
|
||||||
|
NAPI.Entity.DeleteEntity(grndObject);
|
||||||
|
NAPI.Entity.DeleteEntity(grndTextLabel);
|
||||||
|
GroundObjects.Remove(grndObject);
|
||||||
|
GroundTextLabels.Remove(grndTextLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ using reallife_gamemode.Model;
|
|||||||
using reallife_gamemode.Server.Commands;
|
using reallife_gamemode.Server.Commands;
|
||||||
using reallife_gamemode.Server.Entities;
|
using reallife_gamemode.Server.Entities;
|
||||||
using reallife_gamemode.Server.Extensions;
|
using reallife_gamemode.Server.Extensions;
|
||||||
|
using reallife_gamemode.Server.Inventory;
|
||||||
using reallife_gamemode.Server.Inventory.Interfaces;
|
using reallife_gamemode.Server.Inventory.Interfaces;
|
||||||
using reallife_gamemode.Server.Services;
|
using reallife_gamemode.Server.Services;
|
||||||
using System;
|
using System;
|
||||||
@@ -102,6 +103,35 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int GetUserInventoryWeight(Client player)
|
||||||
|
{
|
||||||
|
var user = player.GetUser();
|
||||||
|
var inventoryWeight = 0;
|
||||||
|
|
||||||
|
using (var context = new DatabaseContext())
|
||||||
|
{
|
||||||
|
List<UserItem> userItems = context.UserItems.ToList().FindAll(i => i.UserId == user.Id);
|
||||||
|
foreach (var item in userItems)
|
||||||
|
{
|
||||||
|
IItem iItem = GetItemById(item.ItemId);
|
||||||
|
var currentItemWeight = iItem.Gewicht * item.Amount;
|
||||||
|
inventoryWeight += currentItemWeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return inventoryWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UserItem UserHasThisItem(Client player, int itemId)
|
||||||
|
{
|
||||||
|
var user = player.GetUser();
|
||||||
|
using (var context = new DatabaseContext())
|
||||||
|
{
|
||||||
|
UserItem existingItem = context.UserItems.FirstOrDefault(i => i.UserId == user.Id && i.ItemId == itemId);
|
||||||
|
return existingItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void GetUserItemsAsAdmin(Client player, Entities.User user)
|
public static void GetUserItemsAsAdmin(Client player, Entities.User user)
|
||||||
{
|
{
|
||||||
var inventoryWeight = 0;
|
var inventoryWeight = 0;
|
||||||
@@ -174,28 +204,35 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
var user = player.GetUser();
|
var user = player.GetUser();
|
||||||
using (var context = new DatabaseContext())
|
using (var context = new DatabaseContext())
|
||||||
{
|
{
|
||||||
|
UserItem existingItem = context.UserItems.FirstOrDefault(i => i.ItemId == item.ItemId && i.UserId == item.UserId);
|
||||||
|
if (existingItem != null)
|
||||||
List<UserItem> allItemsByUser = context.UserItems.ToList().FindAll(i => i.UserId == user.Id);
|
|
||||||
var slotArr = Enumerable.Range(1, 20).ToList();
|
|
||||||
allItemsByUser.ForEach(allItem =>
|
|
||||||
{
|
{
|
||||||
if (slotArr.Contains(allItem.Slot)) slotArr.Remove(allItem.Slot);
|
existingItem.Amount += item.Amount;
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<UserItem> allItemsByUser = context.UserItems.ToList().FindAll(i => i.UserId == user.Id);
|
||||||
|
var slotArr = Enumerable.Range(1, 20).ToList();
|
||||||
|
allItemsByUser.ForEach(allItem =>
|
||||||
|
{
|
||||||
|
if (slotArr.Contains(allItem.Slot)) slotArr.Remove(allItem.Slot);
|
||||||
|
});
|
||||||
|
|
||||||
int newSlot = slotArr.Min();
|
int newSlot = slotArr.Min();
|
||||||
|
|
||||||
item.Slot = newSlot;
|
item.Slot = newSlot;
|
||||||
context.UserItems.Add(item);
|
context.UserItems.Add(item);
|
||||||
|
|
||||||
|
IItem iItem = GetItemById(item.ItemId);
|
||||||
|
|
||||||
|
string[] newItem = new string[] { iItem.Name, iItem.Description, iItem.Gewicht.ToString(), item.Amount.ToString(), newSlot.ToString(), item.Id.ToString() };
|
||||||
|
|
||||||
|
player.TriggerEvent("addItem", JsonConvert.SerializeObject(newItem));
|
||||||
|
}
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
IItem iItem = GetItemById(item.ItemId);
|
|
||||||
|
|
||||||
string[] newItem = new string[] { iItem.Name, iItem.Description, iItem.Gewicht.ToString(), item.Amount.ToString(), newSlot.ToString(), item.Id.ToString() };
|
|
||||||
|
|
||||||
player.TriggerEvent("addItem", JsonConvert.SerializeObject(newItem));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("removeItemAsAdmin")]
|
[RemoteEvent("removeItemAsAdmin")]
|
||||||
public void SavePlayerInventory(Client player, string amount, string userItemId, string targetPlayerName)
|
public void SavePlayerInventory(Client player, string amount, string userItemId, string targetPlayerName)
|
||||||
{
|
{
|
||||||
@@ -208,13 +245,13 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
if (amount == "stack")
|
if (amount == "stack")
|
||||||
{
|
{
|
||||||
var itemSlot = fItem.Slot;
|
var itemSlot = fItem.Slot;
|
||||||
targetPlayer.TriggerEvent("removeItem", userItemId, "stack");
|
targetPlayer.TriggerEvent("removeItem", userItemId, fItem.Amount);
|
||||||
context.UserItems.Remove(fItem);
|
context.UserItems.Remove(fItem);
|
||||||
}
|
}
|
||||||
else if (amount == "one")
|
else if (amount == "one")
|
||||||
{
|
{
|
||||||
var itemSlot = fItem.Slot;
|
var itemSlot = fItem.Slot;
|
||||||
targetPlayer.TriggerEvent("removeItem", userItemId, "one");
|
targetPlayer.TriggerEvent("removeItem", userItemId, 1);
|
||||||
fItem.Amount--;
|
fItem.Amount--;
|
||||||
}
|
}
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
@@ -267,11 +304,14 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
|
|
||||||
if (iItem is IDroppableItem usableItemObj2)
|
if (iItem is IDroppableItem usableItemObj2)
|
||||||
{
|
{
|
||||||
|
Vector3 dropPosition = new Vector3(player.Position.X, player.Position.Y, player.Position.Z - 0.8f);
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
NAPI.Object.CreateObject(3777723516, new Vector3(player.Position.X, player.Position.Y, player.Position.Z - 0.8), new Vector3(0, 0, r.Next(0, 360)), 0);
|
GTANetworkAPI.Object grndObject = NAPI.Object.CreateObject(3777723516, dropPosition, new Vector3(0, 0, r.Next(0, 360)), 0);
|
||||||
NAPI.TextLabel.CreateTextLabel(iItem.Name + " ~s~(~y~" + amount + "~s~)", new Vector3(player.Position.X, player.Position.Y, player.Position.Z - 0.6), 5, 0.5f, 4, new Color(255, 255, 255), false, 0);
|
GroundItem grndItem = new GroundItem { ItemId = iItem.Id, Amount = amount, Position = dropPosition};
|
||||||
|
TextLabel grndTxtLbl = NAPI.TextLabel.CreateTextLabel(iItem.Name + " ~s~(~y~" + amount + "~s~)", dropPosition, 5, 0.5f, 4, new Color(255, 255, 255), false, 0);
|
||||||
|
GroundItem.AddGroundItem(grndItem, grndObject, grndTxtLbl);
|
||||||
fItem.Amount -= amount;
|
fItem.Amount -= amount;
|
||||||
player.TriggerEvent("removeItem", itemId, amount);
|
player.TriggerEvent("removeItem", itemId, amount);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,15 +34,5 @@ namespace reallife_gamemode.Server.Saves
|
|||||||
public float Rotation { get; set; }
|
public float Rotation { get; set; }
|
||||||
public byte Dimension { get; set; }
|
public byte Dimension { get; set; }
|
||||||
public bool Active { get; set; }
|
public bool Active { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TempBlip
|
|
||||||
{
|
|
||||||
public byte Color { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public byte Transparency { get; set; }
|
|
||||||
public bool ShortRange { get; set; }
|
|
||||||
public uint Sprite { get; set; }
|
|
||||||
public float Scale { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user