Even commercial clients face the same problems, people being able to hitchhike load the client.
The only way is the client safe to cllient-hacking is to be a braind-dead 2d display having the server doing *all* calculation and sending the just frame pictures to the client. But this is a horror in bandwith, so most games make efficient bandwith and the client knows of how the game world is constructed, and this just leads to the fact of the problem that people are able to hack-extend their client.
Hashing and alltogether has been pointed out, just doesn't work. Imagine following code in the original client
sendToServer(getMyHashCode());
Now the hacked client:
//sendToServer(getMyHashCode());
sendToServer(0x67272838484a212s11); // this is the hash of the unmodified client