diff --git a/ReallifeGamemode.Client/Gui/Inventory/inventory.ts b/ReallifeGamemode.Client/Gui/Inventory/inventory.ts index 601e73e0..f1fe3bcc 100644 --- a/ReallifeGamemode.Client/Gui/Inventory/inventory.ts +++ b/ReallifeGamemode.Client/Gui/Inventory/inventory.ts @@ -1,6 +1,9 @@ import InputHelper from '../../inputhelper'; export default function inventory(globalData: GlobalData) { + var q; + var qw = 0; + var show = false; //ob das Inventar dem Spieler gezeigt wird. var showAdmin = false; //ob das Inventar eines Spielers dem Admin gezeigt wird @@ -196,6 +199,18 @@ export default function inventory(globalData: GlobalData) { if (show === true) { pos = mp.gui.cursor.position; + for (q = 0; q < items.length; q++) { + mp.game.graphics.drawText("[" + items[q][0] + "]" + "[" + items[q][2] + "]" + "[" + items[q][3] + "]" + "[" + items[q][4] + "]" + "[" + items[q][5] + "]", [0.1, 0.4 + qw], { + //mp.game.graphics.drawText("(MOIN)", [0.1, 0.4 + qw], { + font: 4, + color: [255, 255, 255, 254], + scale: [0.4, 0.4], + outline: true, + centre: false + }); + qw += 0.025; + } + mp.game.graphics.set2dLayer(1); //# mp.game.graphics.drawRect(rxC, ryC, 0.45, 0.7, 255, 255, 255, 200); //INVENTARHINTERGRUND @@ -459,10 +474,10 @@ export default function inventory(globalData: GlobalData) { outline: true, centre: false }); - } + } } - + ////--------------------------------------------------------------DEBUG //mp.game.graphics.drawText(itemRadial.toString() + " ~y~" + radialSelect, [0.5, 0.05], { @@ -480,6 +495,7 @@ export default function inventory(globalData: GlobalData) { //}); ////----------------------------------------------------------DEBUG END } + qw = 0; if (showAdmin === true) { pos = mp.gui.cursor.position; @@ -1010,6 +1026,7 @@ export default function inventory(globalData: GlobalData) { items.push([items[dragItem][0], items[dragItem][1], items[dragItem][2], "1", actFreeSlot.toString(), "-1"]); if (items[hoverItem][3] === 0) { items[hoverItem][4] = "-1"; + items.splice(hoverItem, 1); } } else { items.push([tradeItems[dragItem][0], tradeItems[dragItem][1], tradeItems[dragItem][2], "1", actFreeSlot.toString(), "-1"]);