[*] Fix trade

This commit is contained in:
Lukas Moungos
2019-09-12 21:58:02 +02:00
parent deb6b7092e
commit 3ae6f5add7
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@
<button id='tf_cancle3' onclick="">Schließen</button>
</div>
<input type="text" id="tf_nameorid" name="number" placeholder="Zum Rucksack transferieren" min="1" step="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');">
<input type="text" id="tf_nameorid" name="fname" placeholder="Name oder ID eingeben">
<button id='tf_submitTrade' onclick="">Senden</button>
<div class="title"><div class="titlecount"><span id="count3">0</span> Kilogramm</div><div class="titletext">Handeln</div></div>
@@ -116,7 +116,7 @@
handelItemID.push(handelInv[i].ID);
handelItemAmount.push(handelInv[i].Amount);
}
mop.trigger("CEF:submitTrade")
mp.trigger("CEF:submitTrade", 0, JSON.stringify($('#fname').val()), JSON.stringify(handelItemID), JSON.stringify(handelItemAmount))
}
});
$("#tf_cancle4").unbind('click').click(function () {

View File

@@ -119,7 +119,7 @@ export default function inventory(globalData: GlobalData): void {
try {
invBrowser.destroy()
invBrowser = null;
mp.events.callRemote('tradeItem', money, User, tradeItems, tradeItemAmount);
mp.events.callRemote('tradeItem', 0, User, tradeItems, tradeItemAmount);
} finally {
mp.gui.cursor.show(false, false);
}