$('#playerInventory').droppable({
drop: function (event, ui) {
itemData = ui.draggable.data("item");
itemInventory = ui.draggable.data("inventory");
if (type === "trunk" && itemInventory === "second") {
disableInventory(500);
$.post("http://esx_inventoryhud/TakeFromTrunk", JSON.stringify({
item: itemData,
number: parseInt($("#count").val())
}));
} else if (type === "property" && itemInventory === "second") {
disableInventory(500);
$.post("http://esx_inventoryhud/TakeFromProperty", JSON.stringify({
item: itemData,
number: parseInt($("#count").val())
}));
} else if (type === "player" && itemInventory === "second") {
disableInventory(500);
$.post("http://esx_inventoryhud/TakeFromPlayer", JSON.stringify({
item: itemData,
number: parseInt($("#count").val())
}));
}
}
});