[Release] Weapons On Back

I found that when I took out the gun, resmon would increase suddenly (Although it may not affect server performance). But by the way, I like this scrip, thank you. :+1:

1 Like

I have found a solution that I just mentioned about the resmon problem.

Add this

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
1 Like

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.

1 Like