Somewhere in the game memory is the X,Y, and Z location of each player. The game needs to know this information so it knows where to render the player's model and so forth (although you can limit how much the game client can know by only sending it player information for players in view).
An aimbot can scan known memory locations for this information and read it out, giving it access to two positions--the player's and the enemies. Subtracting the two positions (as vectors) gives the vector between the two and it's simple from there to calculate the angle from the player's current look vector to the desired angle vector.
By sending input directly to the game (this is trivial) and fine-tuning with some constants you can get it to aim automatically pretty quickly. The hardest part of the process is nailing down where the positions are stored in memory and adjusting for any dynamic data structure moving players around on you (such as frustum culling).
Note that these are harder to write when address randomization is used, although not impossible.
Edit: If you're wondering how a program can access other programs memory, the typical way to do it is through DLL injection.
Edit: Since this is still getting some hits there are more ways that aimbots work that are more popular now; namely overwriting (or patching in-place) the Direct3D or OpenGL DLL and examining the functions calls to draw geometry and inserting your own geometry (for things like wall-hacks) or getting the positions of the models for an aimbot.
As of git 1.7.1, you can set init.templatedir in your gitconfig to tell git where to look for templates.
Set it like this:
git config --global init.templatedir '~/.git_template'
Afterward, new repositories you create or clone will use this directory for templates. Place the hooks you want in ~/.git_template/hooks
. Existing repositories can be reinitialized with the proper templates by running git init
in the same directory .git
is in.
For git versions older than 1.7.1, running git init --template ~/.git_template
will work if you're like me and still want to manage your .git_template
dir along with the rest of your dot files. You can also use the $GIT_TEMPLATE_DIR
environment to tell git init
where your template directory is.
Best Answer
Essentially it's a place in code that allows you to tap in to a module to either provide different behavior or to react when something happens.