This is possible (atleast with Half-Life), and already was done by one guy with nick "Vasily Pupkin", this bots was called ClientBot, but in 2003 Vasily disappeared from coding (and CS) scene, and close all websites & support to his projects, however, some info & code still can be found on web archive at
http://archive.org, (search for clientbot.narod.ru or clientb0t.counter-strike.ru)...
(sorry for my english)