rebar-altv
rebar-altv copied to clipboard
function useweapon bug,
/** * Save current player weapons */ function save() { const document = Rebar.document.character.useCharacter(player); if (!document.get()) { return; }
const ammo: { [key: string]: number } = {};
for (let weapon of player.weapons) {
ammo[weapon.hash] = player.getAmmo(weapon.hash);
}
document.setBulk({
weapons: player.weapons,
ammo: ammo,
});
}
player.getAmmo(weapon.hash) not work, the hash should be the ammohash,not weapon hash...
getweaponhash is ok..