Don’t use GetPlayerController(0) on server side for this, it will always return the first player / local player / server player. If the 2nd player switches weapon you’re gonna store/retrieve ammo from the 1st player.
In character blueprint, you should be able to use “GetController” instead, to get the controller of this character.