Well first to need to determine if you can use WPM and it hasn't been hooked by the games anti-hacking system which is most likely was.
Then you can simple retrieve the process id of the target, open the handle, write memory and finally close the handle.
Take a look at OpenProcess, WriteProcessMemory, and Process32First on MSDN.