[SNIPPET] AIM AT POSITION

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,280
Likes
30
Points
98
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
10
#1
Instead of using this shitty long function for an aimbot which was made by some russian:

Code:
:AIM
var
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
[email protected] :float
end
0087: [email protected] = [email protected] // (float)
0087: [email protected] = [email protected] // (float)
0087: [email protected] = [email protected] // (float)
068D: get_camera_position_to [email protected] [email protected] [email protected]            
//04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset [email protected] [email protected] [email protected]
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
[email protected] -= [email protected]
[email protected] -= [email protected]
0096: make [email protected] absolute_float
0096: make [email protected] absolute_float
[email protected] = [email protected]
[email protected] = [email protected]
[email protected] *= [email protected]                                           
[email protected] *= [email protected]
[email protected] += [email protected]
01FB: [email protected] = square_root [email protected] // Ac
[email protected] = [email protected] // Aa vrem
[email protected] = [email protected] // Ac vrem
[email protected] /= [email protected]
0AA5: call 0x4207A0 num_params 1 pop 1 _value [email protected] // asin
0AE9: pop_float [email protected] // fstp [[email protected]]
0AA5: call 0x48DE40 num_params 1 pop 1 _value [email protected] // acos
0AE9: pop_float [email protected] // fstp [[email protected]]
if 
0ab1: @getSlotWeapon 0 [email protected]
then 
    if 0ab1: @getAngleForCam 7 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
    then 
        [email protected] += 0.0389
        0A8C: write_memory 0xB6F258 size 4 value [email protected] virtual_protect 0
    end
end
0ab2: 0         
:getAngleForCam
var
    [email protected] : float
end
if [email protected] == 5
then
    [email protected] = 0.0100
    [email protected] = 0.0100
    [email protected] = 1.5607
    [email protected] = 1.5807
else if [email protected] == 6
    then
        [email protected] = 0.0180
        [email protected] = 0.0200
        [email protected] = 1.5507
        [email protected] = 1.5907
    else
        [email protected] = 0.0
        [email protected] = 0.0
        [email protected] = 1.5707
        [email protected] = 1.5707
    end
end
if and
    [email protected] > [email protected]
    [email protected] > [email protected]
then
    [email protected] -= [email protected]
    [email protected] = [email protected]
end                   
if and
    [email protected] > [email protected]
    [email protected] < [email protected]
then
    [email protected] *= -1.0
    [email protected] -= [email protected]
    [email protected] = [email protected]
end                   
if and
    [email protected] < [email protected]
    [email protected] > [email protected]
then
    [email protected] += [email protected]
    [email protected] = [email protected]
end                   
if and
    [email protected] < [email protected]
    [email protected] < [email protected]
then
    [email protected] *= -1.0
    [email protected] -= [email protected]
    [email protected] = [email protected]
end 
0A8D: [email protected] = read_memory 0xB6F258 size 4 virtual_protect 0
[email protected] -= [email protected]
if and
    [email protected] < 0.1800
    [email protected] > -0.1800
then 0485: return_true
else 059A: return_false
end
0ab2: 1 [email protected]
:getSlotWeapon
0A96: [email protected] = actor $player_actor struct
[email protected] += 0x718
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
if or
    [email protected] == 2
    [email protected] == 3
    [email protected] == 4
    [email protected] == 5
    [email protected] == 6
    [email protected] == 7
then 0485: return_true
else 059A: return_false
end
0ab2: 1 [email protected]               
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: [email protected] = player $PLAYER_CHAR targeted_actor
    THEN
        Actor.StorePos([email protected], [email protected], [email protected], [email protected])
        0AB1: @AIM_AT_POS 4 XYZ: [email protected] [email protected] [email protected] ADD_CAMERA_OFFSET 0.04253
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: [email protected] [email protected] [email protected]
:AIM_AT_POS
0087: [email protected] = [email protected]
068D: get_camera_position_to [email protected] [email protected] [email protected]
0063: [email protected] -= [email protected]
0063: [email protected] -= [email protected]
0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]
[email protected] -= 90.0
0017: [email protected] /= 57.2957795            
005B: [email protected] += [email protected]  // (float)                           
0A8D: [email protected] = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle [email protected] Z_angle [email protected]
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
175
Likes
0
Points
31
Location
Mars
#4
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: [email protected]  $PLAYER_CHAR 
else_jump @NONAME_109 
0ACC: "~G~AIMBOT ~R~ON~G~/OFF -~W~ ENABLED"  -1
Actor.StorePos([email protected], [email protected], [email protected], [email protected])
call @NONAME_116 4 [email protected] [email protected] [email protected] 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: [email protected] = [email protected] // (float) 
068D: get_camera_position_to [email protected] [email protected] [email protected] 
0063: [email protected] -= [email protected] // (float) 
0063: [email protected] -= [email protected] // (float) 
0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected] 
[email protected] -= 90.0 
[email protected] /= 57.29578 
005B: [email protected] += [email protected] // (float) 
0A8D: [email protected] = read_memory 11989576 size 4 virtual_protect 0 
0A25: set_camera_on_players_X_angle [email protected] Z_angle [email protected] 
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.
 
OP
OP
Opcode.eXe

Opcode.eXe

Well-Known Member
Joined
Feb 18, 2013
Messages
1,280
Likes
30
Points
98
Location
( ͡° ͜ʖ ͡°)
Website
www.youtube.com
10
#5
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: [email protected] = player $PLAYER_CHAR targeted_actor
        THEN
            Actor.StorePos([email protected], [email protected], [email protected], [email protected])
            0AB1: @AIM_AT_POS 4 XYZ: [email protected] [email protected] [email protected] ADD_CAMERA_OFFSET 0.04253
        END
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: [email protected] [email protected] [email protected]
:AIM_AT_POS
0087: [email protected] = [email protected]
068D: get_camera_position_to [email protected] [email protected] [email protected]
0063: [email protected] -= [email protected]
0063: [email protected] -= [email protected]
0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]
[email protected] -= 90.0
0017: [email protected] /= 57.2957795           
005B: [email protected] += [email protected]  // (float)                           
0A8D: [email protected] = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle [email protected] Z_angle [email protected]
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
 

_=Gigant=_

Well-Known Member
Joined
Mar 21, 2017
Messages
393
Likes
11
Points
23
#6
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: [email protected] = player $PLAYER_CHAR targeted_actor
        THEN
            Actor.StorePos([email protected], [email protected], [email protected], [email protected])
            0AB1: @AIM_AT_POS 4 XYZ: [email protected] [email protected] [email protected] ADD_CAMERA_OFFSET 0.04253
        END
    END
END
//0AB1: @AIM_AT_POS 3 XYZ: [email protected] [email protected] [email protected]
:AIM_AT_POS
0087: [email protected] = [email protected]
068D: get_camera_position_to [email protected] [email protected] [email protected]
0063: [email protected] -= [email protected]
0063: [email protected] -= [email protected]
0604: get_Z_angle_for_point [email protected] [email protected] store_to [email protected]
[email protected] -= 90.0
0017: [email protected] /= 57.2957795           
005B: [email protected] += [email protected]  // (float)                           
0A8D: [email protected] = read_memory 0xB6F248 size 4 virtual_protect 0
0A25: set_camera_on_players_X_angle [email protected] Z_angle [email protected]
0661: "by Opcode.eXe | UGBASE.EU"
0AB2: 0
u are alive walking einstein  man
 
Top