[SNIPPET] AIM AT POSITION

Instead of using this shitty long function for an aimbot which was made by some russian:

Code:
:AIM
var
1@ :float
2@ :float
3@ :float
4@ :float
5@ :float
6@ :float
7@ :float
8@ :float
9@ :float
10@ :float
11@ :float
12@ :float
13@ :float
14@ :float
15@ :float
end
0087: 4@ = 1@ // (float)
0087: 5@ = 2@ // (float)
0087: 6@ = 3@ // (float)
068D: get_camera_position_to 1@ 2@ 3@            
//04C4: store_coords_to 4@ 5@ 6@ from_actor 0@ with_offset 7@ 8@ 9@
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
1@ -= 4@
2@ -= 5@
0096: make 1@ absolute_float
0096: make 2@ absolute_float
10@ = 1@
11@ = 2@
10@ *= 10@                                           
11@ *= 11@
10@ += 11@
01FB: 10@ = square_root 10@ // Ac
11@ = 1@ // Aa vrem
12@ = 10@ // Ac vrem
11@ /= 12@
0AA5: call 0x4207A0 num_params 1 pop 1 _value 11@ // asin
0AE9: pop_float 12@ // fstp [0@]
0AA5: call 0x48DE40 num_params 1 pop 1 _value 11@ // acos
0AE9: pop_float 13@ // fstp [0@]
if 
0ab1: @getSlotWeapon 0 16@
then 
    if 0ab1: @getAngleForCam 7 4@ 5@ 7@ 8@ 12@ 13@ 16@ 15@
    then 
        15@ += 0.0389
        0A8C: write_memory 0xB6F258 size 4 value 15@ virtual_protect 0
    end
end
0ab2: 0         
:getAngleForCam
var
    0@ : float
end
if 6@ == 5
then
    7@ = 0.0100
    8@ = 0.0100
    9@ = 1.5607
    10@ = 1.5807
else if 6@ == 6
    then
        7@ = 0.0180
        8@ = 0.0200
        9@ = 1.5507
        10@ = 1.5907
    else
        7@ = 0.0
        8@ = 0.0
        9@ = 1.5707
        10@ = 1.5707
    end
end
if and
    2@ > 0@
    3@ > 1@
then
    5@ -= 8@
    15@ = 5@
end                   
if and
    2@ > 0@
    3@ < 1@
then
    5@ *= -1.0
    5@ -= 7@
    15@ = 5@
end                   
if and
    2@ < 0@
    3@ > 1@
then
    4@ += 9@
    15@ = 4@
end                   
if and
    2@ < 0@
    3@ < 1@
then
    4@ *= -1.0
    4@ -= 10@
    15@ = 4@
end 
0A8D: 11@ = read_memory 0xB6F258 size 4 virtual_protect 0
11@ -= 15@
if and
    11@ < 0.1800
    11@ > -0.1800
then 0485: return_true
else 059A: return_false
end
0ab2: 1 15@
:getSlotWeapon
0A96: 0@ = actor $player_actor struct
0@ += 0x718
0A8D: 1@ = read_memory 0@ size 1 virtual_protect 0
if or
    1@ == 2
    1@ == 3
    1@ == 4
    1@ == 5
    1@ == 6
    1@ == 7
then 0485: return_true
else 059A: return_false
end
0ab2: 1 1@               

You should use my short function to set the camera angle to your position you want:
( Skin Aimbot example: )


Code:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0
    IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
    THEN
        Actor.StorePos(0@, 1@, 2@, 3@)
        0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:AIM_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795            
005B: 6@ += 8@  // (float)                           
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0

If you want to understand this function a bit with my pro explaining skills:
When you aim and print out your camera angles you will notice that these values range from +-0.0 to +-3.14159.
These are called Radians. To convert position to radians we first have to get the Z-angle(degree) between your camera and the target point.
Why? Because its easy to convert degrees(Z Angle) to Radians, just divide the degree with 57.2957795. But before that we remove -90.0 from the Z angle: "Angles are reversed in GTA:SA". Then we add the little crosshair offset to the radian so that the position is perfectly in the crosshair^^
 

Husnain

Well-known member
Joined
May 20, 2016
Messages
228
Reaction score
9
Location
Mars
And here is the Snippet of Aim at Position with On/Off Style.   :sadpepe: :sadpepe:
Code:
{$CLEO}

0000: Nigger

:NONAME_2
wait 0 
if and
key_down 18 
0AD2: 0@  $PLAYER_CHAR 
else_jump @NONAME_109 
0ACC: "~G~AIMBOT ~R~ON~G~/OFF -~W~ ENABLED"  -1
Actor.StorePos(0@, 1@, 2@, 3@)
call @NONAME_116 4 1@ 2@ 3@ 0.04253 

:NONAME_109
wait 0 
if 
 8AB0:  18
else_jump @NONAME_2
wait 100
0ACC: "~G~AIMBOT ~R~ON~G~/OFF -~W~ Disabled"  2000 
jump @NONAME_2 

:NONAME_116
0087: 8@ = 3@ // (float) 
068D: get_camera_position_to 3@ 4@ 5@ 
0063: 0@ -= 3@ // (float) 
0063: 1@ -= 4@ // (float) 
0604: get_Z_angle_for_point 0@ 1@ store_to 6@ 
6@ -= 90.0 
6@ /= 57.29578 
005B: 6@ += 8@ // (float) 
0A8D: 7@ = read_memory 11989576 size 4 virtual_protect 0 
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@ 
ret 0 
end_thread
Now, if you hold "ALT" then the crosshair will directly aim at nearest target actor and if you Release the button then the mod will be deactivated.

It's kinda Undetectable.
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,488
Reaction score
231
Location
( ͡° ͜ʖ ͡°)
That one is such a bad example. I made it better and understandable by just adding about 3 lines in my own example:


PHP:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0     
    IF
    0AB0: key_pressed 18
    THEN
        IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
        THEN
            Actor.StorePos(0@, 1@, 2@, 3@)
            0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
        END
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:AIM_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795           
005B: 6@ += 8@  // (float)                           
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
Opcode.eXe said:
That one is such a bad example. I made it better and understandable by just adding about 3 lines in my own example:


PHP:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0     
    IF
    0AB0: key_pressed 18
    THEN
        IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
        THEN
            Actor.StorePos(0@, 1@, 2@, 3@)
            0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
        END
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:AIM_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795           
005B: 6@ += 8@  // (float)                           
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
u are alive walking einstein  man
 

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
That one is such a bad example. I made it better and understandable by just adding about 3 lines in my own example:


PHP:
{$CLEO .cs}
0000:

WHILE TRUE
    WAIT 0     
    IF
    0AB0: key_pressed 18
    THEN
        IF 0AD2: 0@ = player $PLAYER_CHAR targeted_actor
        THEN
            Actor.StorePos(0@, 1@, 2@, 3@)
            0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
        END
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: 1@ 2@ 3@
:AIM_AT_POS
0087: 8@ = 3@
068D: get_camera_position_to 3@ 4@ 5@
0063: 0@ -= 3@
0063: 1@ -= 4@
0604: get_Z_angle_for_point 0@ 1@ store_to 6@
6@ -= 90.0
0017: 6@ /= 57.2957795           
005B: 6@ += 8@  // (float)                           
0A8D: 7@ = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle 7@ Z_angle 6@
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
This aimbot is not workin for sniper :/ do it for sniper too pls
 
Top