[HELP] Weapon accessories

So right now it won’t save my weapon accessories in my db loadout, so you always need to unequip to keep it in your inventory when you are leaving the server. Does someone know how to fix this? Maybe i need to make it server sided? any ideas how to?

    if weapons[GetSelectedPedWeapon(PlayerPedId())] and weapons[GetSelectedPedWeapon(PlayerPedId())][type] then
        if not HasPedGotWeaponComponent(GetPlayerPed(-1), GetSelectedPedWeapon(PlayerPedId()), weapons[GetSelectedPedWeapon(PlayerPedId())][type]) then
            GiveWeaponComponentToPed(GetPlayerPed(-1), GetSelectedPedWeapon(PlayerPedId()), weapons[GetSelectedPedWeapon(PlayerPedId())][type]) 
            --sr.ShowNotification(string.format('%s %s', type, "Installed."))
end

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.