I have found a solution that I just mentioned about the resmon problem.
GetSelectedPedWeapon(me) ~= wep_hash
for wep_name, wep_hash in pairs(SETTINGS.compatable_weapon_hashes) do if HasPedGotWeapon(me, wep_hash, false) then if not attached_weapons[wep_name] and GetSelectedPedWeapon(me) ~= wep_hash then AttachWeapon(wep_name, wep_hash, SETTINGS.back_bone, SETTINGS.x, SETTINGS.y, SETTINGS.z, SETTINGS.x_rotation, SETTINGS.y_rotation, SETTINGS.z_rotation, isMeleeWeapon(wep_name)) end end end
Awesome! Thanks for taking the time to investigate and report that issue as well as providing a solution for it and for being astute to notice that!
I’ve just updated the OP with an updated link to the newest release, 1.2, which includes this optimization.