Simply install to your project:
sampctl package install BrunoBM16/samp-server-weapons
Include in your code:
#include <sv-weap>
This include will only synchronize weapons given by the server, otherwise players would see you with no weapon in hands (fists). It also covers ammo.
Totally compatible with filterscripts. No adaptation needed since it checks when the server sends those RPCs (GivePlayerWeapon, SetSpawnInfo, RequestClass, etc) to the client.