CLEO Help help to add check

CLEO related
Status
Not open for further replies.

boxi

Member
Joined
Mar 27, 2016
Messages
8
Reaction score
0
[font='Open Sans', Arial, sans-serif]Help to add[/font][font='Open Sans', Arial, sans-serif] a check if the green triangle on the character that aim work , if you do not burn doesn't wor[/font][font='Open Sans', Arial, sans-serif]k.[/font]
Code:
{$CLEO .cs}
{$INCLUDE SF}
0000:
repeat
wait 0
until SAMP.Available()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
call @Configuration 0 29@ 27@ 26@ 25@ 24@ 23@
0B34: samp register_client_command "aim" to_label @cmd_hook
0BE2: raknet setup_outcoming_packet_hook @PACKET_SYNC_HOOK
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
while true
wait 0
end
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:cmd_hook
if 0B61: samp is_local_player_spawned
then
    if 30@ == 0
 then 0AF8: samp add_message_to_chat "AIM Activated" 
    else 0AF8: samp add_message_to_chat "AIM Deactivated.
    end   
    0B12: 30@ = 30@ XOR 1
end
SAMP.CmdRet()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:DamageConvert
0A96: 2@ = actor $PLAYER_ACTOR struct
2@ += 0x72C
0A8D: 2@ = read_memory 2@ size 1 virtual_protect 0
0470: 0@ = actor $PLAYER_ACTOR current_weapon
0085: 1@ = 0@
if 2@ == 2
    then 1@ += 25
    end
if 2@ == 3
    then 1@ += 36
    end
1@ *= 112
1@ += 13150904
1@ += 0x22
0A8D: 1@ = read_memory 1@ size 2 virtual_protect 0
0093: 1@ = integer 1@ to_float
if and
0@ >= 22
0@ <> 25
0@ <> 26
0@ <> 27
0@ <= 34
then 1@ /= 3.0434782608695652173913043478261
end 
ret 1 1@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:GiveTakeDamageRPC
4@ = BitStream.New()
BitStream.Write(4@, 0, BS_TYPE_BOOL, 1)
BitStream.Write(4@, 0@, BS_TYPE_SHORT, 2)
BitStream.Write(4@, 1@, BS_TYPE_FLOAT, 4)
BitStream.Write(4@, 2@, BS_TYPE_INT, 4)
BitStream.Write(4@, 3, BS_TYPE_INT, 4)
RakNet.LiteRPC(115, 4@)
BitStream.Delete(4@)
ret 0 
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:Detour
call @DamageConvert 0 return_to 13@
call @GiveTakeDamageRPC 3 0@ 13@ 1@ 
ret 0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:SEND_ONFOOT_PACKET
Actor.StorePos(0@, 1@, 2@, 3@)
0604: get_Z_angle_for_point 1@ 2@ store_to 17@
0B2B: samp 8@ = get_player_id_by_actor_handle $PLAYER_ACTOR
alloc 4@ 68
0BBA: samp store_player 8@ onfoot_data 4@
0C0D: struct 4@ offset 18 size 4 = 17@
0BC0: samp send_onfoot_data 4@
free 4@ 
ret 0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:SendSilentBullet
0470: 3@ = actor $PLAYER_ACTOR current_weapon
Actor.StorePos($PLAYER_ACTOR, 4@, 5@, 6@)
0B2B: samp 8@ = get_player_id_by_actor_handle 0@
Actor.StorePos(0@, 9@, 10@, 11@)
alloc 2@ 40
0C0D: struct 2@ offset 0 size 1 = 1
0C0D: struct 2@ offset 1 size 2 = 8@
0C0D: struct 2@ offset 3 size 4 = 4@
0C0D: struct 2@ offset 7 size 4 = 5@ 
0C0D: struct 2@ offset 11 size 4 = 6@ 
0C0D: struct 2@ offset 15 size 4 = 9@ 
0C0D: struct 2@ offset 19 size 4 = 10@
0C0D: struct 2@ offset 23 size 4 = 11@
0098: 22@ = random_float 0.0 _to_ 0.3 
0098: 23@ = random_float 0.0 _to_ 0.3
0098: 24@ = random_float 0.0 _to_ 0.3
0C0D: struct 2@ offset 27 size 4 = 22@ 
0C0D: struct 2@ offset 31 size 4 = 23@
0C0D: struct 2@ offset 35 size 4 = 24@ 
0C0D: struct 2@ offset 39 size 1 = 3@ 
12@ = RakNet.NewBitStream()
RakNet.Write(12@, 206, BS_TYPE_BYTE, 1)
RakNet.Write(12@, 2@, BS_TYPE_ARRAY, 40)
RakNet.LiteSend(12@)
RakNet.DeleteBitStream(12@)
free 2@
ret 2 8@ 3@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:ColorFilter
18@ = 0
17@ = 0
if 0@ == 1
then
    0B2B: samp 22@ = get_player_id_by_actor_handle 1@
    0B2B: samp 21@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    0B37: samp 20@ = get_player_color 22@
    0B37: samp 19@ = get_player_color 21@
    if 0085: 20@ == 19@
    then 18@ = 1
    end
end
if and 
    0@ == 1
    18@ == 0 
then 17@ = 1
end
if 0@ == 0
then 17@ = 1
end
ret 1 17@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:PACKET_SYNC_HOOK
0BE5: raknet 2@ = get_hook_param PARAM_BITSTREAM
0BE5: raknet 3@ = get_hook_param PARAM_PACKETID
if 3@ == PACKET_BULLET_SYNC
then
    if 30@ == 1
    then
        0AB1: @GET_AIM_TARGET_ACTOR 1 IN_RADIUS_FROM_CROSSHAIR 29@ _STORE_TO 7@
        if 7@ <> -1
        then
            call @ColorFilter 2 23@ 7@ 17@
            if 17@ == 1
            then
                if 27@ == 1
                then
                    if 26@ == 1
                    then call @SEND_ONFOOT_PACKET 1 7@
                    end
                end 
                if 24@ == 0
                then call @SendSilentBullet 1 7@ ret_to 0@ 1@
                else
                    0209: 31@ = random_int_in_ranges 0 24@
                    if 002D: 31@ <= 24@
                    then call @SendSilentBullet 1 7@ ret_to 0@ 1@
                    end 
                end
                if 27@ == 1
                then 
                    if 25@ == 1
                    then call @Detour 2 0@ 1@
                    end
                end
                0BE0: raknet hook_ret false
            end
        end
    end
end
0BE0: raknet hook_ret true
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:GET_AIM_TARGET_ACTOR
FOR 28@ = 0.0 TO 0@ STEP 8.0
    0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
    000A: 29@ += 0x4
    0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
    for 30@ = 0 to 35584 step 0x100
        0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
        000A: 29@ += 0x1
        if and
            0029:  31@ >= 0x00
            001B:  0x80 > 31@
        then
            005A: 31@ += 30@
            if
            056D:  actor 31@ defined
            then
                if
                    803C: $PLAYER_ACTOR == 31@
                then
                04C4: store_coords_to 27@ 26@ 25@ from_actor 31@ with_offset 0.0 0.0 0.0
                068D: get_camera_position_to 24@ 23@ 22@
                    if and 
                        06BD:  no_obstacles_between 27@ 26@ 25@ and 24@ 23@ 22@ solid 1 car 1 actor 0 object 1 particle 0
                        80DF:  actor 31@ driving
                        8118:  actor 31@ dead
                        02CB:  actor 31@ bounding_sphere_visible
                    then
                        04C4: store_coords_to 10@ 11@ 12@ from_actor 31@ 0.0 0.0 0.0 
                        0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 10@ Y 11@ Z 12@ store_screen_X_to 13@ Y_to 14@
                        0509: 15@ = distance_between_XY 339.1 179.1 and_XY 13@ 14@
                        if
                            0035:  28@ >= 15@ 
                        then
                            0AB2: 1 31@     
                        end 
                    end
                end
            end
        end
    end
END
0AB2: 1 -1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:Configuration
    29@ = 50.0 
    27@ = 1
    26@ = 1
    25@ = 1
    24@ = 0
    23@ = 0
ret 6 29@ 27@ 26@ 25@ 24@ 23@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:getScreenXYFrom3DCoords
0AC7: 14@ = var 0@ offset
0AC7: 15@ = var 3@ offset
0AC7: 16@ = var 6@ offset
0AC7: 17@ = var 9@ offset
0AA5: call 0x70CE30 num_params 6 pop 6 {18@ 18@} 0 0 17@ 16@ 15@ 14@
0007: 12@ = 640.0
0007: 13@ = 448.0
0A8D: 14@ = read_memory 0xC17044 size 4 virtual_protect 0
0A8D: 15@ = read_memory 0xC17048 size 4 virtual_protect 0
0093: 14@ = integer 14@ to_float
0093: 15@ = integer 15@ to_float
0073: 12@ /= 14@
0073: 13@ /= 15@
006B: 3@ *= 12@
006B: 4@ *= 13@
0AB2: ret 2 3@ 4@
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
here

Code:
0AB1: @GET_AIM_TARGET_ACTOR 1 IN_RADIUS_FROM_CROSSHAIR 29@ _STORE_TO 7@
if 7@ <> -1


you can insert a check to make sure 7@ and the result of 0AD2 are the same. 0AD2 being the opcode which return the handle of the actor on which the green marker is currently on.
 
Status
Not open for further replies.
Top