CLEO Help Help with script

CLEO related
Status
Not open for further replies.

KapeikuBus

Member
Joined
Apr 4, 2020
Messages
7
Reaction score
0
Location
Lietuva
Hi I encountered a problem that my Aim target is near the player.Parazitas said to put a crooshair offset, but I myself do not pay anything could someone do it?

Code:
{$CLEO .cs}

0000: NOP

wait 10000 // wait until samp is ready

while true
wait 0

if
0AB0: key_pressed 2 // RIGHT MOUSE
then
    IF
    0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
    THEN
        0AB1: @GET_BONE_POS 2 FROM_ACTOR 0@ BONE_ID 2 _STORE_TO 1@ 2@ 3@  // CENTER
        0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
    END
end

end

:GET_BONE_POS
0085: 10@ = 0@ // (int)
0085: 15@ = 1@ // (int)
1@ = 0.0 // X offset
2@ = 0.0 // Y offset {THX TO: WESSER}
3@ = 0.0 // Z offset
0A96: 0@ = actor 10@ struct
0AC7: 4@ = var 1@ offset
0AA6: call_method 0x5E01C0 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 15@ vOffset 4@ // CPed__getBonePositionWithOffset
0AB2: retn 3 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
 

Attachments

  • aimukas.cs
    18.6 KB · Views: 0

Zin

Expert
Joined
Aug 1, 2013
Messages
1,734
Solutions
2
Reaction score
117
C++:
0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
Pretty sure you don't need any offset so you can just put 0.0 but if not keep changing it until it's right. If you still have a problem you might need to add a dynamic offset that changes depending on whatever factors.
 

KapeikuBus

Member
Joined
Apr 4, 2020
Messages
7
Reaction score
0
Location
Lietuva
C++:
0AB1: @AIM_AT_POS 4 XYZ: 1@ 2@ 3@ ADD_CAMERA_OFFSET 0.04253
Pretty sure you don't need any offset so you can just put 0.0 but if not keep changing it until it's right. If you still have a problem you might need to add a dynamic offset that changes depending on whatever factors.

Maybe something is changing, but from tall buildings, nothing changes unless it gets worse
 
Status
Not open for further replies.
Top