Raised This Month: $ Target: $400
 0% 

Any reliable legal aimbot code/stock function?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Siveroo
Junior Member
Join Date: Apr 2020
Old 11-16-2020 , 03:22   Any reliable legal aimbot code/stock function?
Reply With Quote #1

i've been using these code below, and it seems like there's a bug. Sometimes when the player is using the aimbot, he will aim the sky or the ground instead of the enemy. I get this code from another plugin, i might as well attach is if necesary, but either way this is the code i've been using

Code:
iNeariest(iEntity){     new iPlayers[32], iNum;         get_players(iPlayers, iNum, "ahe", get_user_team(iEntity) == 2 ? "TERRORIST" : "CT");         new iClosestPlayer = 0, Float:flClosestDist = 999999.0;     new iPlayer, Float:flDist;         new Float:fOrigin[3], Float:fAngles[3]         static Float:ent_origin[3],Float:fOfs[3];         pev(iEntity,pev_view_ofs,fOfs)         pev(iEntity,pev_origin,ent_origin);         ent_origin[0] += fOfs[0];     ent_origin[1] += fOfs[1];     ent_origin[2] += fOfs[2];         for( new i = 0; i < iNum; i++ )     {         iPlayer = iPlayers[ i ];                 engfunc(EngFunc_GetBonePosition, iPlayer, 7, fOrigin, fAngles);                 flDist = entity_range( iPlayer, iEntity );                 if(flDist < flClosestDist)         {             iClosestPlayer = iPlayer;             flClosestDist = flDist;         }     }     return iClosestPlayer; } entity_set_aim(ent, const Float:origin2[3]){     if(!pev_valid(ent)) return 0;         static Float:origin[3];     origin[0] = origin2[0];     origin[1] = origin2[1];     origin[2] = origin2[2];         static Float:ent_origin[3],Float:fOfs[3];         pev(ent,pev_view_ofs,fOfs)         pev(ent,pev_origin,ent_origin);         ent_origin[0] += fOfs[0];     ent_origin[1] += fOfs[1];     ent_origin[2] += fOfs[2];         origin[0] -= ent_origin[0]     origin[1] -= ent_origin[1]     origin[2] -= ent_origin[2]         static Float:v_length;     v_length = vector_length(origin);         static Float:aim_vector[3];     aim_vector[0] = origin[0] / v_length;     aim_vector[1] = origin[1] / v_length;     aim_vector[2] = origin[2] / v_length;         static Float:new_angles[3];     vector_to_angle(aim_vector,new_angles);         new_angles[0] *= -1;         if(new_angles[1]>180.0) new_angles[1] -= 360;     if(new_angles[1]<-180.0) new_angles[1] += 360;     if(new_angles[1]==180.0 || new_angles[1]==-180.0) new_angles[1]=-179.999999;         set_pev(ent,pev_angles,new_angles);     set_pev(ent,pev_fixangle,1);         return 1; }

Basically looking for the nearest enemy and then get their origin, then make the aimbotting player to aim to the origin. But seems like it's a little broken. So please let me know if there's another more reliable code i can use. Thank you
Siveroo is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode