Вопросы по CLEO-скриптингу

AWRage

Активный
642
141
Насколько я знаю, бесконечые циклы запрещены в командах.
А конечный цикл for разрешен?
CLEO:
{$CLEO}
0000:
0B34: samp register_client_command "ppos" to_label @PlayerPos
0BDE: pause_thread 0

:PlayerPos
for 0@ = -1 to 999 step 1
  1@++
end
log "Число: %i" 1@
cmdret
 

AWRage

Активный
642
141
Можно ли, чтобы маркер на радаре отображался поверх других иконок (иконок игроков)? Иногда, его не видно из-за того, что он появляется под иконкой игрока..
02A8: 0@ = create_marker 0 at 1@ 2@ 3@
 

reylayng

Новичок
6
0
Код:
{$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 "saim" to_label @cmd_hook
0B34: samp register_client_command "saimcfg" to_label @cmd_hook2
0BE2: raknet setup_outcoming_packet_hook @PACKET_SYNC_HOOK
0AF8: samp add_message_to_chat "{99CC00}Silent Aim {00FFFF}by 0pc0d3R" color 0xFFFFFF
0AF8: samp add_message_to_chat "{99CC00}Specially for {FFCC00}BlastHack.Net" color 0xFFFFFF
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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 "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
end
SAMP.CmdRet()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:cmd_hook2
if 0B61: samp is_local_player_spawned
then
    alloc 2@ 20
    0B35: samp 2@ = get_last_command_params
    0AD4: 3@ = scan_string 2@ format "%d %d" 4@ 5@
    if 3@ == 2
    then
        if 4@ == 1
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð TargetHookDistance áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 28@ = 5@
            0093: 29@ = integer 28@ to_float
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
        end
        if 4@ == 2
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð Detour áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 27@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
        end
        if 4@ == 3
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð CorrectAngle áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 26@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
        end
        if 4@ == 4
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð GiveDamageRPC áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 25@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
        end
        if 4@ == 5
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð RandomShot áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 24@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
        end
        if 4@ == 6
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð ClistFilter áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 23@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
        end
    else 0AF8: samp add_message_to_chat "{99CC00}Ââåäèòå: {00FFFF}/saimcfg {FFCC00}[íîìåð ïàðàìåòðà(1-6)] {FF0000}[çíà÷åíèå]" 0xFFFFFF
    end
    free 2@
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
if 0AAB: file_exists "CLEO\AimConfig_v2[by_0pc0d3R].ini"
then
    0AF0: 28@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
    0AF0: 27@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
    0AF0: 26@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
    0AF0: 25@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
    0AF0: 24@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
    0AF0: 23@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
    0093: 29@ = integer 28@ to_float
else
    0AF1: write_int 50 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
    29@ = 50.0
    27@ = 1
    26@ = 1
    25@ = 1
    24@ = 0
    23@ = 0
end
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@
Как поменять активацию на CTRL?
 

hnnssy

Известный
Друг
2,684
2,744
Код:
{$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 "saim" to_label @cmd_hook
0B34: samp register_client_command "saimcfg" to_label @cmd_hook2
0BE2: raknet setup_outcoming_packet_hook @PACKET_SYNC_HOOK
0AF8: samp add_message_to_chat "{99CC00}Silent Aim {00FFFF}by 0pc0d3R" color 0xFFFFFF
0AF8: samp add_message_to_chat "{99CC00}Specially for {FFCC00}BlastHack.Net" color 0xFFFFFF
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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 "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
end
SAMP.CmdRet()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:cmd_hook2
if 0B61: samp is_local_player_spawned
then
    alloc 2@ 20
    0B35: samp 2@ = get_last_command_params
    0AD4: 3@ = scan_string 2@ format "%d %d" 4@ 5@
    if 3@ == 2
    then
        if 4@ == 1
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð TargetHookDistance áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 28@ = 5@
            0093: 29@ = integer 28@ to_float
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
        end
        if 4@ == 2
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð Detour áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 27@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
        end
        if 4@ == 3
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð CorrectAngle áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 26@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
        end
        if 4@ == 4
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð GiveDamageRPC áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 25@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
        end
        if 4@ == 5
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð RandomShot áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 24@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
        end
        if 4@ == 6
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð ClistFilter áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 23@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
        end
    else 0AF8: samp add_message_to_chat "{99CC00}Ââåäèòå: {00FFFF}/saimcfg {FFCC00}[íîìåð ïàðàìåòðà(1-6)] {FF0000}[çíà÷åíèå]" 0xFFFFFF
    end
    free 2@
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
if 0AAB: file_exists "CLEO\AimConfig_v2[by_0pc0d3R].ini"
then
    0AF0: 28@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
    0AF0: 27@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
    0AF0: 26@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
    0AF0: 25@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
    0AF0: 24@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
    0AF0: 23@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
    0093: 29@ = integer 28@ to_float
else
    0AF1: write_int 50 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"
    29@ = 50.0
    27@ = 1
    26@ = 1
    25@ = 1
    24@ = 0
    23@ = 0
end
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@
Как поменять активацию на CTRL?
CLEO:
while true
wait 0
if key 17
then
    if 30@ == 0
    then 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
wait 250
end
end
 

reylayng

Новичок
6
0
CLEO:
while true
wait 0
if key 17
then
    if 30@ == 0
    then 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
wait 250
end
end
0B34: samp register_client_command "saim" to_label @cmd_hook удалять?
 

reylayng

Новичок
6
0
CLEO:
while true
wait 0
if key 17
then
    if 30@ == 0
    then 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
wait 250
end
end
после этого выдает что активирован но аим не робит))
 

reylayng

Новичок
6
0
Дай теперь весь код, который получился.
Код:
{$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 "saimcfg" to_label @cmd_hook2
0BE2: raknet setup_outcoming_packet_hook @PACKET_SYNC_HOOK
0AF8: samp add_message_to_chat "{99CC00}Silent Aim {00FFFF}by 0pc0d3R" color 0xFFFFFF
0AF8: samp add_message_to_chat "{99CC00}Specially for {FFCC00}BlastHack.Net" color 0xFFFFFF
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
while true
while true
wait 0
if 0AB0: key_pressed 17
then
    if 30@ == 0
    then 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FFCC00}Activated!" color 0xFFFFFF
    else 0AF8: samp add_message_to_chat "{99CC00}{*Silent AIM*} {00FFFF}by 0pc0d3R - {FF0000}Deactivated." color 0xFFFFFF
    end
    0B12: 30@ = 30@ XOR 1
wait 250
end
end
SAMP.CmdRet()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
:cmd_hook2
if 0B61: samp is_local_player_spawned
then
    alloc 2@ 20
    0B35: samp 2@ = get_last_command_params
    0AD4: 3@ = scan_string 2@ format "%d %d" 4@ 5@
    if 3@ == 2
    then 
        if 4@ == 1
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð TargetHookDistance áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 28@ = 5@  
            0093: 29@ = integer 28@ to_float
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance"  
        end
        if 4@ == 2
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð Detour áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 27@ = 5@  
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour"  
        end
        if 4@ == 3
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð CorrectAngle áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 26@ = 5@ 
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"  
        end
        if 4@ == 4
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð GiveDamageRPC áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 25@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC"  
        end
        if 4@ == 5
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð RandomShot áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 24@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot"  
        end
        if 4@ == 6
        then
            0AF8: samp add_message_to_chat "{99CC00}Ïàðàìåòð ClistFilter áûë óñïåøíî îáíîâëåí!" 0xFFFFFF
            0085: 23@ = 5@
            0AF1: write_int 5@ to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter"  
        end
    else 0AF8: samp add_message_to_chat "{99CC00}Ââåäèòå: {00FFFF}/saimcfg {FFCC00}[íîìåð ïàðàìåòðà(1-6)] {FF0000}[çíà÷åíèå]" 0xFFFFFF
    end
    free 2@
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
if 0AAB: file_exists "CLEO\AimConfig_v2[by_0pc0d3R].ini" 
then
    0AF0: 28@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance" 
    0AF0: 27@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour" 
    0AF0: 26@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle"  
    0AF0: 25@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC" 
    0AF0: 24@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot" 
    0AF0: 23@ = get_int_from_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter" 
    0093: 29@ = integer 28@ to_float 
else
    0AF1: write_int 50 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "TargetHookDistance" 
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "Detour" 
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "CorrectAngle" 
    0AF1: write_int 1 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "GiveDamageRPC" 
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "RandomShot" 
    0AF1: write_int 0 to_ini_file "CLEO\AimConfig_v2[by_0pc0d3R].ini" section "Settings" key "ClistFilter" 
    29@ = 50.0 
    27@ = 1
    26@ = 1
    25@ = 1
    24@ = 0
    23@ = 0
end
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@
 

AWRage

Активный
642
141
Как в переменную записать ник-нейм в формате Nick_Name? Точнее как указатель перевести в строку? Надеюсь, я правильно выразился.
0B36: 1@ = get_player_nickname 0@