Why the hell are you using WriteProcessMemory? You're injeting the dll into the game, you don't need WriteProcessMemory, you can simply write directly to the addresses...
*address = value;
And wtf is "int main(int argc, char *argv[])" on the beginning of you code? It's a dll file...
You should get a C++ book...