[*] Fixed Vehicle Invetory
This commit is contained in:
@@ -174,7 +174,6 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public bool CheckOriginOfItem(Client client, string jsonItemID, string jsonItemAmount, string jsonOrigin, string jsonVehAmount)
|
||||
{
|
||||
NAPI.Util.ConsoleOutput("HIER LENNART ->>>>, " + jsonOrigin);
|
||||
var origin = JsonConvert.DeserializeObject<int[]>(jsonOrigin);
|
||||
var itemID = JsonConvert.DeserializeObject<int>(jsonItemID);
|
||||
var itemAmount = JsonConvert.DeserializeObject<int>(jsonItemAmount);
|
||||
@@ -182,11 +181,15 @@ namespace ReallifeGamemode.Server.Managers
|
||||
var user = client.GetUser();
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
if (origin.Length < 1)
|
||||
return false;
|
||||
|
||||
|
||||
if (origin[0] == 1)
|
||||
{
|
||||
foreach (Vehicle veh in NAPI.Pools.GetAllVehicles())
|
||||
{
|
||||
if (veh.Position.DistanceTo(client.Position) < 2)
|
||||
if (veh.Position.DistanceTo(client.Position) < 2.5f)
|
||||
{
|
||||
if (VehicleStreaming.GetDoorState(veh, DoorID.DoorTrunk) == DoorState.DoorOpen)
|
||||
{
|
||||
@@ -429,7 +432,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
|
||||
[RemoteEvent("itemInteract")]
|
||||
public void ItemInteract(Client player, string jsonType, string jsonItemId, string jsonAmount)
|
||||
public void ItemInteract(Client player, string jsonType, string jsonAmount, string jsonItemId)
|
||||
{
|
||||
int amount = JsonConvert.DeserializeObject<int>(jsonAmount);
|
||||
int itemId = JsonConvert.DeserializeObject<int>(jsonItemId);
|
||||
|
||||
Reference in New Issue
Block a user