This is a source code, for all noobs out there, don't ask how to use it!
This isn't mine this is my 3rd private aimbot source code here:
001 #include "../stdafx.h"
002
003 void aimbot::drop_current(void)
004 {
005 best_player = NULL;
006 my_current_aim._init(0,0,0);
007
008 if ( m_pCvars->aim_randomizer->GetBool() )
009 {
010 if ( used_bone_index >= 20 )
011 {
012 used_bone_index = 0;
013 }
014 else
015 {
016 used_bone_index += 1;
017 }
018 }
019 else
020 {
021 used_bone_index = m_pCvars->aim_point->GetInt();
022 }
023 return;
024 }
025
026 bool aimbot::is_aimbot_enabled(void)
027 {
028 entity_info* me = m_pEntList->get_local();
029
030 if( !me || !me->is_alive() )
031 {
032 return false;
033 }
034
035 if ( m_pCvars->aim_bot->GetInt() == 0 )
036 {
037 return false;
038 }
039
040 if ( m_pCvars->aim_dont_aim_duck->GetBool() )
041 {
042 if( chk_flags(me->Getflags(),FL_DUCKING) )
043 {
044 return false;
045 }
046 }
047
048 if ( !m_pEntList->local.has_no_ammo() )
049 {
050 return false;
051 }
052
053 if( !m_pCvars->aim_miscweapon->GetBool() && m_pEntList->local.has_misc_weapon() )
054 {
055 return false;
056 }
057
058 return
059 m_pCvars->aim_bot->GetInt() == 1 || //alltime
060 m_pCvars->aim_bot->GetInt() == 2 && KEYDOWN( 0x01 ) || //mouse 1
061 m_pCvars->aim_bot->GetInt() == 3 && KEYDOWN( 0x02 ) || //mouse 2
062 m_pCvars->aim_bot->GetInt() == 4 && KEYDOWN( 0x04 ) || //mouse 3
063 m_pCvars->aim_bot->GetInt() == 5 && KEYDOWN( 0x05 ) || //mouse 4
064 m_pCvars->aim_bot->GetInt() == 6 && KEYDOWN( 0x06 ); //mouse 5
065 }
066
067 entity_info* aimbot::get_first_avaiable(void)
068 {
069 entity_info* pl = NULL;
070 for( size_t player_index = 0; player_index < ENTITY_LIST; player_index++ )
071 {
072 //m_pExport->add_logA("player_index %i",player_index);
073 entity_info* pl = m_pEntList->get_entity(player_index);
074 if ( pl == NULL ) continue;
075 if ( !pl->is_a_player() ) continue;
076 if ( pl->is_local_player() ) continue;
077 if ( !pl->is_updated() ) continue;
078 if ( !pl->is_alive() ) continue;
079 if ( !check(pl) ) continue;
080 return pl;
081 }
082 return NULL;
083 }
084
085 entity_info* aimbot::get_nearest(void)
086 {
087 entity_info* thatguy = get_first_avaiable();
088
089 if ( thatguy != NULL )
090 {
091 for( size_t player_index = 0; player_index < ENTITY_LIST; player_index++ )
092 {
093 //m_pExport->add_logA("player_index %i",player_index);
094 entity_info* pl = m_pEntList->get_entity(player_index);
095 if ( pl == NULL ) continue;
096 if ( (thatguy == pl) ) continue;
097 if ( !pl->is_a_player() ) continue;
098 if ( pl->is_local_player() ) continue;
099 if ( !pl->is_updated() ) continue;
100 if ( !pl->is_alive() ) continue;
101 if ( !check(pl) ) continue;
102
103 //actual guy distance bigger ?
104 if ( pl->get_distance() < thatguy->get_distance() )
105 {
106 return pl;
107 }
108 }
109 }
110 return thatguy;
111 }
112 entity_info* aimbot::get_nearest_fov(void)
113 {
114 entity_info* thatguy = get_first_avaiable();
115
116 if ( thatguy != NULL )
117 {
118 for( size_t player_index = 0; player_index < ENTITY_LIST; player_index++ )
119 {
120 //m_pExport->add_logA("player_index %i",player_index);
121 entity_info* pl = m_pEntList->get_entity(player_index);
122 if ( pl == NULL ) continue;
123 if ( (thatguy == pl) ) continue;
124 if ( !pl->is_a_player() ) continue;
125 if ( pl->is_local_player() ) continue;
126 if ( !pl->is_updated() ) continue;
127 if ( !pl->is_alive() ) continue;
128 if ( !check(pl) ) continue;
129
130 //is not the nearest of my crosshair
131 if( pl->get_fov() <= thatguy->get_fov() )
132 {
133 return pl;
134 }
135 }
136 }
137 return thatguy;
138 }
139
140 entity_info* aimbot::get_lower_health(void)
141 {
142 entity_info* thatguy = get_first_avaiable();
143
144 if ( thatguy != NULL )
145 {
146 for( size_t player_index = 0; player_index < ENTITY_LIST; player_index++ )
147 {
148 //m_pExport->add_logA("player_index %i",player_index);
149 entity_info* pl = m_pEntList->get_entity(player_index);
150 if ( pl == NULL ) continue;
151 if ( (thatguy == pl) ) continue;
152 if ( !pl->is_a_player() ) continue;
153 if ( pl->is_local_player() ) continue;
154 if ( !pl->is_updated() ) continue;
155 if ( !pl->is_alive() ) continue;
156 if ( !check(pl) ) continue;
157
158 //is not the low life player
159 if ( pl->Gethealth() <= thatguy->Gethealth() )
160 {
161 return pl;
162 }
163 }
164 }
165 return thatguy;
166 }
167
168 bool aimbot::search_best_player(void)
169 {
170 entity_info* me = m_pEntList->get_local();
171
172 if ( !is_aimbot_enabled()
173 || me == NULL
174 || me->is_alive() == false
175 || best_player != NULL )
176 {
177 return false;
178 }
179 else
180 {
181 int typeval = m_pCvars->aim_at_best_player->GetInt();
182 if ( typeval == 0 )
183 {
184 best_player = get_first_avaiable();
185
186 return (best_player != NULL)
187 ? true
188 : false;
189 }
190 else
191 {
192 if ( typeval == 1 )
193 {
194 best_player = get_nearest();
195
196 return (best_player != NULL)
197 ? true
198 : false;
199 }
200 else
201 {
202 if ( typeval == 2 )
203 {
204 best_player = get_lower_health();
205
206 return (best_player != NULL)
207 ? true
208 : false;
209 }
210 else
211 {
212 if ( typeval == 3 )
213 {
214 best_player = get_nearest_fov();
215
216 return (best_player != NULL)
217 ? true
218 : false;
219 }
220 else
221 {
222 best_player = NULL;
223 return false;
224 }
225 }
226 }
227 }
228 }
229 return false;
230 }
231
232 bool aimbot::is_this_visible(entity_info* target)
233 {
234 entity_info* me = m_pEntList->get_local();
235
236 if ( target == NULL || me == NULL )
237 {
238 return false;
239 }
240
241 if ( m_pCvars->aim_thru->GetBool() )
242 {
243 return true;
244 }
245
246 if ( target->is_visible() )
247 {
248 return true;
249 }
250
251 if ( !m_pCvars->aim_autowall->GetBool() )
252 {
253 return false;
254 }
255
256 Vector mr = me->GetEyesPos()._Convert<Vector>( );
257 Vector tg = target->GetEyesPos()._Convert<Vector>( );
258
259 Ray_t ray;
260 ray.Init(mr,tg);
261
262 trace_t tr;
263
264 __TRY;
265 valve_games_interfaces::m_pEnginetrace->TraceRay(ray,MASK_NPCWORLDSTATIC|MASK_VISIBLE_AND _NPCS|MASK_SHOT,0,&tr);
266 __CATCH;
267
268 if( tr.fraction >= 0.97 )
269 {
270 return true;
271 }
272
273 if( tr.fraction <= 0.70 )
274 {
275 return false;
276 }
277
278 if( tr.startsolid || tr.allsolid )
279 {
280 return false;
281 }
282
283 surfacedata_t* pSurfaceData = NULL;
284 short surf = 0;
285 surf = tr.surface.surfaceProps;
286
287 __TRY;
288 pSurfaceData = valve_games_interfaces::m_pPhysicAPI->GetSurfaceData(surf);
289 __CATCH;
290
291 if ( pSurfaceData->game.material == 'N'/*CHAR_TEX_SAND*/
292 || pSurfaceData->game.material == 'C'/*CHAR_TEX_CONCRETE*/
293 || pSurfaceData->game.material == 'D'/*CHAR_TEX_DIRT*/
294 || pSurfaceData->game.material == 'F'/*CHAR_TEX_FLESH*/ )
295 {
296 return false;
297 }
298
299 Vector View = tg - mr;
300 float length = View.Length();
301
302 if( length <= 0 )
303 {
304 return false;
305 }
306
307 // penetrate to direction!
308 Vector position;
309 position[0] = tr.endpos[0] + Vector(View / length)[0] * 8.0f;
310 position[1] = tr.endpos[1] + Vector(View / length)[1] * 8.0f;
311 position[2] = tr.endpos[2] + Vector(View / length)[2] * 8.0f;
312
313 ray.Init(mr,position);
314
315 __TRY;
316 valve_games_interfaces::m_pEnginetrace->TraceRay(ray,CONTENTS_SOLID|CONTENTS_GRATE|CONTEN TS_HITBOX,NULL,&tr);
317 __CATCH;
318
319 if( tr.fraction >= 0.97 )
320 {
321 return true;
322 }
323
324 if( tr.fraction <= 0.70 )
325 {
326 return false;
327 }
328
329 if( tr.startsolid || tr.allsolid )
330 {
331 return false;
332 }
333
334 surf = tr.surface.surfaceProps;
335
336 __TRY;
337 pSurfaceData = valve_games_interfaces::m_pPhysicAPI->GetSurfaceData(surf);
338 __CATCH;
339
340 if ( pSurfaceData->game.material == 'N'/*CHAR_TEX_SAND*/
341 || pSurfaceData->game.material == 'C'/*CHAR_TEX_CONCRETE*/
342 || pSurfaceData->game.material == 'D'/*CHAR_TEX_DIRT*/
343 || pSurfaceData->game.material == 'F'/*CHAR_TEX_FLESH*/ )
344 {
345 return false;
346 }
347
348 if( !(target->get_distance() < m_pNospread->max_weapon_dist) )
349 {
350 return false;
351 }
352
353 if( 10 > (m_pNospread->damage * pow((float)m_pNospread->flBulletVelocity,(float)(tr.fraction * target->get_distance()))) )
354 {
355 return false;
356 }
357
358 return true;
359 }
360
361 bool aimbot::check(entity_info* target,bool triggerbot)
362 {
363 if( target == NULL )
364 {
365 return false;
366 }
367
368 entity_info* me = m_pEntList->get_local();
369 if( me == NULL )
370 {
371 return false;
372 }
373
374 int t3am = me->Getteam();
375 int team = target->Getteam();
376 if( team == -1 || t3am == -1 )
377 {
378 /*error.mdl no hitbox cuz no model :(*/
379 return false;
380 }
381
382 //check if we can
383 if ( m_pCvars->aim_team->GetInt() != 2 )
384 {
385 if( m_pCvars->aim_team->GetInt() == 0 && (team == t3am) )
386 {
387 return false;
388 }
389 if( m_pCvars->aim_team->GetInt() == 1 && (team != t3am) )
390 {
391 return false;
392 }
393 }
394
395 // don't waste our precious bullets
396 if ( m_pCvars->anti_deathmatch_spawn_protect->GetBool() )
397 {
398 if ( target->Gethealth() >= 101 )
399 {
400 return false;
401 }
402 }
403
404 // don't check / that ain't needed
405 if ( triggerbot == false )
406 {
407 if ( m_pCvars->aim_fov->GetFloat() <= 350 )
408 {
409 if( m_pCvars->aim_fov->GetFloat() <= target->get_fov() )
410 {
411 return false;
412 }
413 }
414 // can hit ?
415 if ( !is_this_visible(target) )
416 {
417 return false;
418 }
419 }
420
421 return true;
422 }
423
424 void VectorNormalize_Spinbot( vector_3d &vIn, vector_3d * vOut )
425 {
426 float flLen = vIn._length();
427
428 if( flLen == 0 )
429 {
430 vOut->_init(0,0,1);
431 return;
432 }
433
434 flLen = 1 / (flLen + FLT_EPSILON);
435
436 vOut->_init(vIn.x* flLen,vIn.y* flLen,vIn.z* flLen);
437 }
438
439 bool aimbot::aim_trigger_bot( vector_3d& end )
440 {
441 int val = m_pCvars->aim_triggerbot->GetInt();
442
443 // we continue if we plan to draw something
444 if ( !val && !m_pCvars->aim_draw_bots->GetBool() )
445 {
446 return false;
447 }
448
449 entity_info* me = m_pEntList->get_local();
450 if( me == NULL )
451 {
452 return false;
453 }
454
455 if( me->is_alive() == false )
456 {
457 return false;
458 }
459
460 vector_3d
461 s = me->GetEyesPos();
462
463 angles_3d
464 v = me->GetEyesAngle();
465
466 // w/ recoil and spread k
467 if ( val == 3 )
468 {
469 // why so serious? :p
470 if( m_pCvars->aim_norecoil->GetBool() )
471 {
472 v += m_pNospread->qreco;
473 }
474 if( m_pCvars->aim_nospread->GetBool() )
475 {
476 if ( m_pCvars->aim_manual_nospread_angles->GetBool() )
477 {
478 v += m_pNospread->qsprd;
479 }
480 else
481 {
482 v -= m_pNospread->qsprd;
483 }
484 }
485 }
486
487 vector_3d fw,ri,up;
488 v._angle_vectors(&fw,&ri,&up);
489
490 Vector vStart = s._Convert<Vector>();
491 Vector vEnd = vector_3d (s + (fw * 8192))._Convert<Vector>();
492
493 Ray_t ray;
494 ray.Init(vStart,vEnd);
495
496 trace_t tr;
497
498 __TRY;
499 valve_games_interfaces::m_pEnginetrace->TraceRay (ray,
500 MASK_NPCWORLDSTATIC|MASK_VISIBLE_AND_NPCS|MASK_SHO T
501 /*MASK_NPCWORLDSTATIC|CONTENTS_SOLID|CONTENTS_MOVEA BLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBR IS|CONTENTS_HITBOX*/
502 /*CONTENTS_SOLID|CONTENTS_GRATE|CONTENTS_HITBOX*/,NULL,&tr);
503 __CATCH;
504
505 // to draw
506 end._init<Vector>(tr.endpos);
507
508 // dont go past here if you not intend to do anything else than draw
509 if ( !val )
510 {
511 return false;
512 }
513
514 if( tr.m_pEnt == NULL )
515 {
516 return false;
517 }
518
519 int index = tr.m_pEnt->entindex()/*index*/;
520 if( index < 0 )
521 {
522 return false;
523 }
524
525 entity_info* pl = m_pEntList->get_entity(index);
526
527 if( pl == NULL )
528 {
529 return false;
530 }
531
532 // dont shoot at barrels , weapons, etc...
533 if( pl->is_a_player() == false )
534 {
535 return false;
536 }
537
538 // is our enemy?
539 // is allowed to die?
540 if( check(pl,true) == false )
541 {
542 return false;
543 }
544
545 // not needed
546 // if( tr.fraction < 0.92 )
547 // {
548 // return;
549 // }
550
551 // this will enable aimbot / no checks
552 if ( val == 1 )
553 {
554 // bugged model?
555 int m = pl->get_max_hitboxes();
556 if( m == -1 )
557 {
558 return false;
559 }
560
561 // auto aim at that guy
562 // in the middle of the hitbox we point at
563 best_player = pl;
564 used_bone_index = tr.hitbox;
565 }
566
567 // die now thanks
568 return true;
569 }
570
571 void aimbot::spinbot( CUserCmd*cmd )
572 {
573 if( cmd == NULL )
574 {
575 return;
576 }
577
578 if ( !m_pCvars->aim_spinbot->GetBool() )
579 {
580 return;
581 }
582
583 int rand_factor = -360;
584 switch ( rand() % 5 )
585 {
586 case 0: rand_factor = -359.5416; break;
587 case 1: rand_factor = 359.5416; break;
588 case 2: rand_factor = -179.8137; break;
589 case 3: rand_factor = 179.8137; break;
590 case 4: rand_factor = -89.8549; break;
591 case 5: rand_factor = 89.8549; break;
592 }
593
594 angles_3d new_angles(0,0,0);
595 switch ( m_pCvars->aim_spinbot->GetInt() )
596 {
597 case 1:
598 // spin + invert view
599 new_angles.x = -cmd->viewangles.x;
600 new_angles.y = fmod(GetTickCount() / 0.001f* 360.0f, 360.0f);
601 new_angles.z = rand_factor;
602 break;
603 case 2:
604 // up / down,spin + invert view
605 new_angles.x = fmod(GetTickCount() / 0.001f* 60.0f, 60.0f);
606 new_angles.y = -cmd->viewangles.y;
607 new_angles.z = rand_factor;
608 break;
609 case 3:
610 // spin all the way out + invert view
611 new_angles.x = fmod(GetTickCount() / 0.001f* 60.0f, 60.0f);
612 new_angles.y = fmod(GetTickCount() / 0.001f* 360.0f, 360.0f);
613 new_angles.z = rand_factor;
614 break;
615 case 4:
616 // total inversion
617 new_angles.x = -cmd->viewangles.x;
618 new_angles.y = -cmd->viewangles.y;
619 new_angles.z = rand_factor;
620 break;
621 case 5:
622 // total inversion 2
623 new_angles.x = cmd->viewangles.x + rand_factor;
624 new_angles.y = cmd->viewangles.y + rand_factor;
625 new_angles.z = rand_factor;
626 break;
627 case 6:
628 // you may like pancakes?
629 new_angles.x = cmd->viewangles.x - rand_factor;
630 new_angles.y = cmd->viewangles.y + rand_factor;
631 new_angles.z = rand_factor;
632 break;
633 }
634
635 // current move
636 float forward = cmd->forwardmove;
637 float right = cmd->sidemove;
638 float up = cmd->upmove;
639
640 // untouched viewangles
641 angles_3d viewangles(
642 cmd->viewangles.x,
643 cmd->viewangles.y,
644 cmd->viewangles.z);
645
646 vector_3d viewforward, viewright, viewup;
647 viewangles._angle_vectors(&viewforward, &viewright, &viewup);
648
649 // put our garbage instead of viewangles
650 cmd->viewangles = new_angles._Convert<QAngle>();
651
652 // garbage viewangles
653 viewangles._init(
654 cmd->viewangles.x,
655 cmd->viewangles.y,
656 cmd->viewangles.z);
657
658 //------------------------------------------//
659 // fix walking
660 vector_3d aimforward, aimright, aimup;
661 viewangles._angle_vectors(&aimforward, &aimright, &aimup);
662
663 vector_3d vForwardNorm, vRightNorm, vUpNorm;
664 extern void VectorNormalize_Spinbot(vector_3d&,vector_3d*);
665 VectorNormalize_Spinbot(viewforward, &vForwardNorm );
666 VectorNormalize_Spinbot(viewright , &vRightNorm );
667 VectorNormalize_Spinbot(viewup , &vUpNorm );
668
669 vector_3d
670 fw = vForwardNorm * vector_3d(forward,forward,forward),
671 ri = vRightNorm * vector_3d(right,right,right),
672 uu = vUpNorm * vector_3d(up,up,up);
673
674 // now we walk normally
675 cmd->forwardmove = fw._dot_product(aimforward) + ri._dot_product(aimforward) + uu._dot_product(aimforward);
676 cmd->sidemove = fw._dot_product(aimright) + ri._dot_product(aimright) + uu._dot_product(aimright);
677 cmd->upmove = fw._dot_product(aimup) + ri._dot_product(aimup) + uu._dot_product(aimup);
678 }
679
680 void aimbot::aiming_doit(CUserCmd* cmd)
681 {
682 if ( cmd == NULL )
683 {
684 return;
685 }
686
687 if( best_player == NULL )
688 {
689 return;
690 }
691
692 my_current_aim = get_aim_point( best_player );
693
694 if( my_current_aim._is_zero() )
695 {
696 return;
697 }
698
699 entity_info* me = m_pEntList->get_local();
700
701 if( me == NULL )
702 {
703 return;
704 }
705
706 if( !me->is_alive() )
707 {
708 return;
709 }
710
711 angles_3d meyes = me->GetEyesAngle();
712 if( meyes._is_zero() )
713 {
714 return;
715 }
716
717 //aim to kill
718 if ( aim_at_this(meyes,my_current_aim,cmd) )
719 {
720 // if triggerbot is 3 just fix inside aimbot,
721 // disable it for manual shot and triggerbot
722 int val = m_pCvars->aim_triggerbot->GetInt();
723 if ( val == 3 )
724 {
725 // fix angles
726 extern void fix_angles( CUserCmd* cmd );
727 fix_angles( cmd );
728 }
729 }
730 }
731
732 void aimbot::aiming_time(CUserCmd* cmd)
733 {
734 drop_current();
735
736 if( cmd != NULL )
737 {
738 // normal try
739 bool aimat = aim_trigger_bot(my_current_aim_draw);
740 if ( aimat )
741 {
742 // fire then,
743 add_flags(cmd->buttons,IN_ATTACK);
744 my_current_aim = my_current_aim_draw;
745 }
746
747 // will directly aim?
748 bool got = (best_player != NULL) ? true : false;
749 if ( got == false )
750 {
751 __TRY;
752 // or we will search a poor victim :p
753 got = search_best_player();
754 __CATCH;
755 }
756
757 // kill him already
758 if ( got == true )
759 {
760 __TRY;
761 aiming_doit(cmd);
762 __CATCH;
763 }
764 }
765
766 drop_current();
767 }
768
769 vector_3d aimbot::get_aim_point( entity_info* pl )
770 {
771 entity_info* me = m_pEntList->get_local();
772
773 if( pl == NULL || me == NULL )
774 {
775 return vector_3d(0,0,0);
776 }
777
778 vector_3d aimdot(0,0,0);
779 switch ( m_pCvars->aim_mode->GetInt() )
780 {
781 default:
782 case 0:
783 //BONE MODE
784 aimdot._vector_add(pl->bone_pos(used_bone_index));
785 break;
786 case 1:
787 //HITBOX MODE
788 aimdot._vector_add(pl->hitbox_pos(used_bone_index));
789 break;
790 case 2:
791 //VECTOR MODE
792 aimdot._vector_add(pl->GetAbsOrigin());
793 aimdot._vector_add(vector_3d(
794 m_pCvars->aim_vector_x->GetFloat(),
795 m_pCvars->aim_vector_y->GetFloat(),
796 m_pCvars->aim_vector_z->GetFloat()));
797
798 uint fl = pl->Getflags();
799 if ( fl )
800 {
801 if( !chk_flags(fl,FL_ONGROUND) )
802 {
803 aimdot._vector_add(vector_3d(0,0,25));
804 }
805 if( chk_flags(fl,FL_DUCKING) )
806 {
807 aimdot._vector_substract(vector_3d(0,0,25));
808 }
809 }
810 break;
811 }
812
813 if( m_pCvars->misc_aimbot_position_tweak->GetBool() )
814 {
815 aimdot._vector_add( vector_3d(
816 m_pCvars->misc_aimbot_position_tweak_x->GetFloat(),
817 m_pCvars->misc_aimbot_position_tweak_y->GetFloat(),
818 m_pCvars->misc_aimbot_position_tweak_z->GetFloat()));
819 }
820
821 if ( !aimdot._is_valid() || aimdot._is_zero() )
822 {
823 return vector_3d(0,0,0);
824 }
825
826 // only need it if it's moving & if no speedhack
827 if ( (pl->Getspeed() > 0 || me->Getspeed() > 0) )
828 {
829 INetChannelInfo* ntw = valve_games_interfaces::m_pEngine->GetNetChannelInfo();
830 if ( ntw )
831 {
832 // get latency
833 uint fLatency = ntw->GetLatency( FLOW_OUTGOING );
834 if ( fLatency > 5 && fLatency < 500 )
835 {
836 // apply predict
837 aimdot._vector_ma(aimdot,1 + fLatency);
838 }
839 else
840 {
841 if ( fLatency >= 499 )
842 {
843 // apply predict
844 aimdot._vector_ma(aimdot,1 + 500);
845 }
846 }
847 }
848 }
849
850 //aim to kill
851 return aimdot;
852 }
853
854 bool aimbot::aim_at_this(angles_3d& your_angles, vector_3d position, CUserCmd*cmd )
855 {
856 if( cmd == NULL )
857 {
858 return false;
859 }
860
861 if( !position._is_valid() || position._is_zero() )
862 {
863 return false;
864 }
865
866 entity_info* me = m_pEntList->get_local();
867
868 if ( me == NULL )
869 {
870 return false;
871 }
872
873 if ( me->is_alive() == false )
874 {
875 return false;
876 }
877
878 vector_3d aim = position;
879 vector_3d eyes = me->GetEyesPos();
880 Vector eye = eyes._Convert<Vector>();
881 QAngle old = cmd->viewangles;
882
883 // get aim angles
884 your_angles._calculate_angle(eyes,aim);
885
886 if( !your_angles._is_valid() || your_angles._is_zero() )
887 {
888 return false;
889 }
890
891 // slow aim is slow.
892 if( m_pCvars->misc_slow_aimbot_move->GetBool() )
893 {
894 angles_3d qDelta;
895 qDelta._init<QAngle>(your_angles._Convert<QAngle>( ) - cmd->viewangles);
896
897 while(qDelta.x > 180) qDelta.x -= 360;
898 while(qDelta.y > 180) qDelta.y -= 360;
899 while(qDelta.z > 180) qDelta.z -= 360;
900
901 while(qDelta.x < -180) qDelta.x += 360;
902 while(qDelta.y < -180) qDelta.y += 360;
903 while(qDelta.z < -180) qDelta.z += 360;
904
905 your_angles._init<QAngle>(
906 cmd->viewangles + qDelta._Convert<QAngle>() / m_pCvars->misc_slow_aimbot_move->GetFloat());
907
908 while(your_angles.x > 180) your_angles.x -= 360;
909 while(your_angles.y > 180) your_angles.y -= 360;
910 while(your_angles.z > 180) your_angles.z -= 360;
911
912 while(your_angles.x < -180) your_angles.x += 360;
913 while(your_angles.y < -180) your_angles.y += 360;
914 while(your_angles.z < -180) your_angles.z += 360;
915 }
916
917 // set aim angles
918 cmd->viewangles = your_angles._Convert<QAngle>();
919
920 // silent aim (set view yes/no)
921 if ( !m_pCvars->aim_silent->GetBool() )
922 {
923 QAngle bak = cmd->viewangles;
924 QAngle rec = bak - m_pNospread->qreco._Convert<QAngle>();
925
926 // remove visual recoil on aim , or not
927 if ( m_pCvars->aim_norecoil->GetInt() == 2 )
928 {
929 if( m_pCvars->misc_slow_aimbot_move->GetBool() )
930 {
931 // set aim angles
932 rec = bak;
933 }
934 else
935 {
936 // set aim angles , and remove punch angles
937 rec = bak - m_pNospread->qreco._Convert<QAngle>();
938 }
939 }
940 else
941 {
942 // set aim angles
943 rec = bak;
944 }
945
946 // traditional aim way
947 valve_games_interfaces::m_pEngine->SetViewAngles(rec);
948
949 //
950 // // and this too, but that's clearly not needed
951 // valve_games_interfaces::m_pPrediction->SetViewAngles(rec);
952 //
953 // // multiple things that are supposed to do the same action
954 // valve_games_interfaces::m_pRender->SetMainView(eye,rec);
955 //
956 // // we'll do that also
957 // valve_games_interfaces::m_pClient->SetCrosshairAngle(rec);
958 // one of them paint black over the screen(randomly on use),
959 // i let you find which one of them lulz
960 }
961
962 //////////////////////////////////////////////////////////////////////////
963 // Disconnect: Kicked by Console : [zBlock] Invalid Eye-Angles Detected.
964 C_BaseEntity* be = me->base_entity();
965
966 if ( be != NULL )
967 {
968 if ( hl2_offsets::m_iEyeAnglesX && hl2_offsets::m_iEyeAnglesY )
969 {
970 m_pExport->SetClass_float(be,hl2_offsets::m_iEyeAnglesX,old. x);
971 m_pExport->SetClass_float(be,hl2_offsets::m_iEyeAnglesY,old. y);
972
973 be->OnDataChanged( DATA_UPDATE_DATATABLE_CHANGED );
974 }
975 }
976
977 if ( !m_pCvars->aim_fire->GetBool() )
978 {
979 return true;
980 }
981
982 //ATTACK?
983 add_flags(cmd->buttons,IN_ATTACK);
984 return true;
985 }
986
987
Last edited by Maui_Hawaii_USA; 05-29-2012 at 11:58 AM.
This is a source code, for all noobs out there, don't ask how to use it!
Ex Middleman
Nice Finally some real hacks on this site.
copy it into a txt, change it to .exe and run >.>
FBI got my PC...Hardcore cheating is paused atm..
Would someone mind explaining how you compile this?
Is this Source Code for C++? I think you gonna copy this into the Visual Basic C++ and save it as Aimbot.exe. Or not?
It doesn't work for me I think i have 64 bit windows is there any possible way to make this work for windows 7 64 bit?
Can you paste it in raw so there are no numbers. Id like to compile it without having to delete all the numbers or atleast comment them out
how do i make it where its an Exucutable?. cuz i have nooooo clue