Problem in my multiplayer game

Hello, i’m creating a simple multiplayer shooter game, i was doing well until a problem comes up, when i drop i equip the gun the ammo is reset on the client and server, i know its a silly problem but i’m new to multiplayer, i will post a video, and the codes. If anyone can help me.

link text <------ VIDEO

Code

PickupWeapon

link text

EquipWeapon

link text

DropWeapon

link text

hey there, you can use https://blueprintue.com/ for sharing BPs, reading this screenshots is nearly impossible.
I guess you’re heaving some architecturally errors in your setup…
your’re calling your shoot event on the client, you should put that on serverside to avoid cheating
why are you calling things like spawnRifle on the client? the actor (weapon) should be set to replicated, its properties (like bullet/ammo …) also. this actors should be spawned on the server! and if your server does the shoot event, it will reduce the correct ammo variable and your client will receive it, showing it in your hud. also you don’t need these runOnOwningClient events!? makes sense? hope I could helped a little bit :wink:

Thanks for replying and clarifying. I will redo everything as you said, I did meaningless things lol.

lol - try with a small cubes sample and the fps/tps template - i’m not a guru at all - that would be how I would start messing with this. a small prototype, then understand if/what you need to change in you project to get it also working. good luck

Hey bro, I managed to solve my problem, I put it running on the server the right way lol, like you said, thanks again.

You’re Welcome. Good to Hear it works. Please Mark the answer as correct so the questions is solved :wink: There is a star or Something below up-down arrows. Cheers