Hi guys I’m new to coding and need help on the game Assault Cube.

I have already found the addresses sorry if I don’t know what stuff is called I only know how to get them. Please feel free to teach me if I am wrong because below the names could be wrong.

Ammo:
Ammo Pointer Offset: 0x0, 0x14, 0x384
Final Ammo Offset: 0x150
Ammo Base Pointer: 0x509B74
Client Ammo Base Address: 004000000
Client Ammo Offset: 0x109B74

Now in Visual Basic below code in short :
ReadMemoryProcess(004000000+0x109B74 = Result) then....
ReadMemoryProcess(Result + 0x150 = displays current amount ammo)

But when I want to hack the ammo and give it a new ammo value example 12345. I use the function WriteProcessMemory(Result+0x150, &newammovalue etc) - The ammo doesn’t write it new value into the ammo. Why is this? Could someone show me how they would write new ammo value?

PS; Sorry I am posting from phone I hope you can understand for now. I will post everything once I go on my comp.