resources/[ui]/caue-inventory/nui/scripts.js
// Takes a slot id as playerslot1, or playerslot2
Takes a slot id as playerslot1, or playerslot2
Takes a slot id as playerslot1 or playerslot2
function UpdateSlotBind(slot) {
    const newSlotId = slot.split("playerslot")[1];
    for (const bind of bindSlots) {
        const bindEle = document.getElementById(slot).querySelector(`#bind${bind}`)
        if (bindEle) bindEle.remove();
    }
    if (bindSlots.includes(parseInt(newSlotId)) && slot.includes("playerslot")) {
        document.getElementById(slot).insertAdjacentHTML("beforeend", "<div id='bind" + newSlotId + "'>" + newSlotId + "</div>")
    }
}
function UpdateSlotBind ( slot ) { const newSlotId = slot . split ( "playerslot" ) [ 1 ] ; for ( const bind of bindSlots ) { const bindEle = document . getElementById ( slot ) . querySelector ( ` ${ bind } ` ) if ( bindEle ) bindEle . remove ( ) ; } if ( bindSlots . includes ( parseInt ( newSlotId ) ) && slot . includes ( "playerslot" ) ) { document . getElementById ( slot ) . insertAdjacentHTML ( "beforeend" , "<div id='bind" + newSlotId + "'>" + newSlotId + "</div>" ) } }
Takes a slot id as playerslot1, or playerslot2
Takes a slot id as playerslot1 or playerslot2
// Does this slot already have a slot bind number assigned? if so remove it