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

клешь рояль

Известный
1,255
551
Не пойму. Пишут скрипт и игру крашит при запуске или активации скрипта с кучей варнингов. И не только с этим клео. Помогите.
Код:
{$CLEO}
0000:

    repeat
wait 0
    until samp.Available()

    while true
wait 0
    if
testcheat "kill"
    then
0223: set_actor 0@ health_to 0
    end
end
Я не профи в клео, но вроде в переменной 0@ нечего нету и отправляется дамаг в некуда
 

DonkRage

Известный
406
114
Не пойму. Пишут скрипт и игру крашит при запуске или активации скрипта с кучей варнингов. И не только с этим клео. Помогите.
CLEO:
{$CLEO}
0000:
:NONAME_2
wait 0 
if
8B21:   not samp is_chat_opened 
0ADC:   test_cheat "kill"
else_jump @NONAME_2 
Actor.Health($PLAYER_ACTOR) = 0
jump @NONAME_2
 

D3.Pheonix

🎹
Модератор
2,817
1,599
Код не работает,не показывает на нарко как должен,помогите
Lua:
{$CLEO}
0000:

REPEAT
0001: 0
UNTIL 0AFA:
0BB9: samp 0@ = get_pickup_pool_ptr
alloc 31@ 256
20@ = Render.CreateFont("arial", 10, 12)
WHILE TRUE
0001: 0

    FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1]
        IF 0B51: samp 2@ = pickup_handle_by_id 1@
        THEN
        0A90: 2@ = 1@ * 20
        000A: 2@ += 61444
        000A: 2@ += 0@ // stPickup
        0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
            IF and
            3@ >= 1575
            3@ <= 1580
            THEN
            0C0C: 3@ = struct 2@ offset 8 size 4 // X
            0C0C: 4@ = struct 2@ offset 12 size 4 // Y
            0C0C: 5@ = struct 2@ offset 16 size 4 // Z
                IF 00C2:   sphere_onscreen 3@ 4@ 5@ radius 5.0
                THEN
                00A0: store_actor $PLAYER_ACTOR position_to 15@ 16@ 17@
                050A: 21@ = distance_between_XYZ 15@ 16@ 17@ and_XYZ 3@ 4@ 5@                               
                0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
                00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
                0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@
  
                0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0xFFFFA500
                03F0: enable_text_draw 1 // ????? ?????, ????? ????? ?? ??????, ??? ????? ????????? ? ???? ????????.
               // 0B5A: get_screen_resolution 20@ 21@ // ???????? ?????????? ??????.
                //0B6F: render font 12@ draw_text "GodFatherProject" pos 3@ 4@ color 0xFFFF3300 // ????????? ?????? 
                0092: 21@ = float 21@ to_integer
                format 31@ "distance:  %i m" 21@
                Render.DrawText(20@, 31@, 3@, 4@, -1)
                END
            END
        END
    END
 
END
Ты точно только два id менял ?
Попробуй так
CLEO:
{$CLEO}
0000:

REPEAT
0001: 0
UNTIL 0AFA:
0BB9: samp 0@ = get_pickup_pool_ptr
alloc 31@ 256
20@ = Render.CreateFont("arial", 10, 12)
WHILE TRUE
0001: 0

    FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1]
        IF 0B51: samp 2@ = pickup_handle_by_id 1@
        THEN
        0A90: 2@ = 1@ * 20
        000A: 2@ += 61444
        000A: 2@ += 0@ // stPickup
        0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
            IF or
            3@ == 1575
            3@ == 1580
            THEN
            0C0C: 3@ = struct 2@ offset 8 size 4 // X
            0C0C: 4@ = struct 2@ offset 12 size 4 // Y
            0C0C: 5@ = struct 2@ offset 16 size 4 // Z
                IF 00C2:   sphere_onscreen 3@ 4@ 5@ radius 5.0
                THEN
                00A0: store_actor $PLAYER_ACTOR position_to 15@ 16@ 17@
                050A: 21@ = distance_between_XYZ 15@ 16@ 17@ and_XYZ 3@ 4@ 5@                             
                0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
                00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
                0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@

                0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0xFFFFA500
                03F0: enable_text_draw 1 // ????? ?????, ????? ????? ?? ??????, ??? ????? ????????? ? ???? ????????.
               // 0B5A: get_screen_resolution 20@ 21@ // ???????? ?????????? ??????.
                //0B6F: render font 12@ draw_text "GodFatherProject" pos 3@ 4@ color 0xFFFF3300 // ????????? ??????
                0092: 21@ = float 21@ to_integer
                format 31@ "distance:  %i m" 21@
                Render.DrawText(20@, 31@, 3@, 4@, -1)
                END
            END
        END
    END
END
KEE8JZV
 

Kbho

Участник
59
4
Не работает(.Я когда поменял id на 1275(крутящаяся майка) скрипт работал и я подумал,может он работает на вращающиеся модельки(серьдечко,доллар и тп)?Может с этим клео проще будет реализовать.Ток надо будет еще почистить от мусора,только модельки(я пробовал,не корректно работать начал),хотя можно и без этого
Lua:
{$CLEO .cs} 
//{$NOSOURCE}   
thread "p1cador"
0000:
while not SAMP.Available()
    wait 100
end  
//0B34: samp register_client_command "op" to_label @reload
alloc 0@ 128
0B6D: render 1@ = create_font "Tahoma" height 8 flags  0x4
0AC6: 2@ = label @tObj offset
0AC6: 3@ = label @tPickup offset  
0AC6: 4@ = label @tMarker offset
 

while true
    wait 0
  
    if 0adc: "obj"
        then
        if 12@ == 0
            then  
            //0B12: 12@ = 12@ XOR 1//obj
            12@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 2@
            else
            12@ = 0
            2@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  2@
            2@ -= 27
        end         
    end
  
    if 0adc: "pup"
        then
        if 13@ == 0
            then
            //0b12: 13@ = 13@ XOR 1//pickups
            13@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 3@
            else
            13@ = 0
            3@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  3@
            3@ -= 27
        end              
    end
  
    if 0adc: "mrk"
        then
        if 14@ == 0
            then  
            //0B12: 12@ = 12@ XOR 1//mrk
            14@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 4@
            else
            14@ = 0
            4@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  4@
            4@ -= 27
        end         
    end       
  
    if 12@ == 1     //obj
        then         
        for 31@ = 0 to 1000            
        //wait 0
            if 0B50: samp 30@ = object_handle_by_id 31@
                then 
                01BB: store_object 30@ position_to 29@ 28@ 27@
                if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
                    then
                    Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
                    0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
                    0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@                                       
                    0B68: render draw_line_point1 23@ 22@ point2 21@ 20@ width 1 color 0x8833ff33                     
                    0984: 19@ = object 30@ model                                                
                    0B70: render draw_polygon_pos 23@ 22@ size 3 3 corners 7 rotation 0 color 0xba00ff00
                    format 0@ "id: {ffffff}%d {c1f4c1}model: {ffffff}%d" 31@ 19@
                    23@ += 5
                    22@ -= 7
                    0B6F: render font 1@ draw_text 0@ pos 23@ 22@ color 0xcac1f4c1
                end 
            end
        end
    end

  
    if 13@ == 1     //pickups
        then
        for 31@ = 0 to 4096
            19@ = 0x9788C0
            if 0B51: samp 30@ = pickup_handle_by_id 31@
                then                     
                065B: store_pickup 30@ position_to 29@ 28@ 27@
                if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
                    then
                    Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
                    0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
                    0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@                                       
                    0B68: render draw_line_point1 23@ 22@ point2 21@ 20@ width 1 color 0x88fff333                     
                    //0984: 19@ = object 30@ model                                                
                    0B70: render draw_polygon_pos 23@ 22@ size 3 3 corners 7 rotation 0 color 0xbafff000                    
                    //-
                    0A8E: 16@ = 19@ + 24                                    //model id
                    0A8D: 15@ = read_memory 16@ size 2 virtual_protect 0    //model id   
                    //0A8E: 16@ = 19@ + 26                                    //uniq id                   
                    //0A8D: 14@ = read_memory 16@ size 2 virtual_protect 0    //uniq id
                                                                      
                    //-
                    format 0@ "id: {ffffff}%d {f4f4c1}model: {ffffff}%d" 31@ 15@  //{f4f4c1}uniqId: {ffffff}%d" 31@ 15@ 14@
                    23@ += 5
                    22@ -= 7
                    0B6F: render font 1@ draw_text 0@ pos 23@ 22@ color 0xcaf4f4c1
                end
            end
        end
    end  
  
  
    if 14@ == 1     //markers
        then
        for 31@ = 0 to 31
          
            0085: 30@ = 31@
            30@ *= 160
            30@ +=  0xC7DD58
          
            30@ += 48
            0A8D: 28@ = read_memory 30@ size 4 virtual_protect 0    //posX
            30@ += 4
            0A8D: 27@ = read_memory 30@ size 4 virtual_protect 0    //posY
            30@ += 4
            0A8D: 26@ = read_memory 30@ size 4 virtual_protect 0    //posZ
            30@ += 28
            0A8D: 29@ = read_memory 30@ size 2 virtual_protect 0    //id               
          
            if and
            29@ <> 0
            00C2:   sphere_onscreen 28@ 27@ 26@  radius 0.0
                then
                Actor.StorePos($PLAYER_ACTOR, 24@, 23@, 22@)
                0B55: convert_3D_coords 28@ 27@ 26@ to_screen 21@ 20@ 
                0B55: convert_3D_coords 24@ 23@ 22@ to_screen 19@ 18@
                0B68: render draw_line_point1 21@ 20@ point2 19@ 18@ width 1 color 0x88ff3333
                0B70: render draw_polygon_pos 21@ 20@ size 3 3 corners 7 rotation 0 color 0xbaff0000                 
                format 0@ "id: {ffffff}%d" 29@   //{f4f4c1}uniqId: {ffffff}%d" 31@ 15@ 14@
                21@ += 5                
                20@ -= 7                
                0B6F: render font 1@ draw_text 0@ pos 21@ 20@ color 0xcaf4c1c1            
            end
        end
    end     
end

:tObj  //0AC6: 2@ = label @tObj
hex
70 31 63 61 64 6f 72 3a 20 6f 62 6a 65 63 74 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 6f 62 6a 65 63 74 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

:tPickup  //0AC6: 3@ = label @tPickup offset 
hex
70 31 63 61 64 6f 72 3a 20 70 69 63 6b 75 70 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 70 69 63 6b 75 70 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

:tMarker  //0AC6: 4@ = label @tMarker offset 
hex
70 31 63 61 64 6f 72 3a 20 6d 61 72 6b 65 72 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 6d 61 72 6b 65 72 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

/*:reload
0A92: create_custom_thread "allRender.CS"
0A93: end_custom_thread
0b43: samp cmd_ret   */

Ты точно только два id менял ?
Попробуй так
CLEO:
{$CLEO}
0000:

REPEAT
0001: 0
UNTIL 0AFA:
0BB9: samp 0@ = get_pickup_pool_ptr
alloc 31@ 256
20@ = Render.CreateFont("arial", 10, 12)
WHILE TRUE
0001: 0

    FOR 1@ = 0 TO {MAX_PICKUPS}4096 [STEP = 1]
        IF 0B51: samp 2@ = pickup_handle_by_id 1@
        THEN
        0A90: 2@ = 1@ * 20
        000A: 2@ += 61444
        000A: 2@ += 0@ // stPickup
        0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
            IF or
            3@ == 1575
            3@ == 1580
            THEN
            0C0C: 3@ = struct 2@ offset 8 size 4 // X
            0C0C: 4@ = struct 2@ offset 12 size 4 // Y
            0C0C: 5@ = struct 2@ offset 16 size 4 // Z
                IF 00C2:   sphere_onscreen 3@ 4@ 5@ radius 5.0
                THEN
                00A0: store_actor $PLAYER_ACTOR position_to 15@ 16@ 17@
                050A: 21@ = distance_between_XYZ 15@ 16@ 17@ and_XYZ 3@ 4@ 5@                           
                0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
                00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
                0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@

                0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0xFFFFA500
                03F0: enable_text_draw 1 // ????? ?????, ????? ????? ?? ??????, ??? ????? ????????? ? ???? ????????.
               // 0B5A: get_screen_resolution 20@ 21@ // ???????? ?????????? ??????.
                //0B6F: render font 12@ draw_text "GodFatherProject" pos 3@ 4@ color 0xFFFF3300 // ????????? ??????
                0092: 21@ = float 21@ to_integer
                format 31@ "distance:  %i m" 21@
                Render.DrawText(20@, 31@, 3@, 4@, -1)
                END
            END
        END
    END
END
KEE8JZV
 

D3.Pheonix

🎹
Модератор
2,817
1,599
Не работает(.Я когда поменял id на 1275(крутящаяся майка) скрипт работал и я подумал,может он работает на вращающиеся модельки(серьдечко,доллар и тп)?Может с этим клео проще будет реализовать.Ток надо будет еще почистить от мусора,только модельки(я пробовал,не корректно работать начал),хотя можно и без этого
Lua:
{$CLEO .cs}
//{$NOSOURCE}
thread "p1cador"
0000:
while not SAMP.Available()
    wait 100
end
//0B34: samp register_client_command "op" to_label @reload
alloc 0@ 128
0B6D: render 1@ = create_font "Tahoma" height 8 flags  0x4
0AC6: 2@ = label @tObj offset
0AC6: 3@ = label @tPickup offset
0AC6: 4@ = label @tMarker offset
 

while true
    wait 0
 
    if 0adc: "obj"
        then
        if 12@ == 0
            then
            //0B12: 12@ = 12@ XOR 1//obj
            12@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 2@
            else
            12@ = 0
            2@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  2@
            2@ -= 27
        end      
    end
 
    if 0adc: "pup"
        then
        if 13@ == 0
            then
            //0b12: 13@ = 13@ XOR 1//pickups
            13@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 3@
            else
            13@ = 0
            3@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  3@
            3@ -= 27
        end           
    end
 
    if 0adc: "mrk"
        then
        if 14@ == 0
            then
            //0B12: 12@ = 12@ XOR 1//mrk
            14@ = 1
            0AD1: show_formatted_text_highpriority "%s" time 1488 4@
            else
            14@ = 0
            4@ += 27
            0AD1: show_formatted_text_highpriority "%s" time 1488  4@
            4@ -= 27
        end      
    end    
 
    if 12@ == 1     //obj
        then      
        for 31@ = 0 to 1000         
        //wait 0
            if 0B50: samp 30@ = object_handle_by_id 31@
                then
                01BB: store_object 30@ position_to 29@ 28@ 27@
                if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
                    then
                    Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
                    0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
                    0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@                                    
                    0B68: render draw_line_point1 23@ 22@ point2 21@ 20@ width 1 color 0x8833ff33                  
                    0984: 19@ = object 30@ model                                             
                    0B70: render draw_polygon_pos 23@ 22@ size 3 3 corners 7 rotation 0 color 0xba00ff00
                    format 0@ "id: {ffffff}%d {c1f4c1}model: {ffffff}%d" 31@ 19@
                    23@ += 5
                    22@ -= 7
                    0B6F: render font 1@ draw_text 0@ pos 23@ 22@ color 0xcac1f4c1
                end
            end
        end
    end

 
    if 13@ == 1     //pickups
        then
        for 31@ = 0 to 4096
            19@ = 0x9788C0
            if 0B51: samp 30@ = pickup_handle_by_id 31@
                then                  
                065B: store_pickup 30@ position_to 29@ 28@ 27@
                if 00C2:   sphere_onscreen 29@ 28@ 27@  radius 0.0
                    then
                    Actor.StorePos($PLAYER_ACTOR, 26@, 25@, 24@)
                    0B55: convert_3D_coords 29@ 28@ 27@ to_screen 23@ 22@
                    0B55: convert_3D_coords 26@ 25@ 24@ to_screen 21@ 20@                                    
                    0B68: render draw_line_point1 23@ 22@ point2 21@ 20@ width 1 color 0x88fff333                  
                    //0984: 19@ = object 30@ model                                             
                    0B70: render draw_polygon_pos 23@ 22@ size 3 3 corners 7 rotation 0 color 0xbafff000                 
                    //-
                    0A8E: 16@ = 19@ + 24                                    //model id
                    0A8D: 15@ = read_memory 16@ size 2 virtual_protect 0    //model id
                    //0A8E: 16@ = 19@ + 26                                    //uniq id                
                    //0A8D: 14@ = read_memory 16@ size 2 virtual_protect 0    //uniq id
                                                                   
                    //-
                    format 0@ "id: {ffffff}%d {f4f4c1}model: {ffffff}%d" 31@ 15@  //{f4f4c1}uniqId: {ffffff}%d" 31@ 15@ 14@
                    23@ += 5
                    22@ -= 7
                    0B6F: render font 1@ draw_text 0@ pos 23@ 22@ color 0xcaf4f4c1
                end
            end
        end
    end
 
 
    if 14@ == 1     //markers
        then
        for 31@ = 0 to 31
       
            0085: 30@ = 31@
            30@ *= 160
            30@ +=  0xC7DD58
       
            30@ += 48
            0A8D: 28@ = read_memory 30@ size 4 virtual_protect 0    //posX
            30@ += 4
            0A8D: 27@ = read_memory 30@ size 4 virtual_protect 0    //posY
            30@ += 4
            0A8D: 26@ = read_memory 30@ size 4 virtual_protect 0    //posZ
            30@ += 28
            0A8D: 29@ = read_memory 30@ size 2 virtual_protect 0    //id            
       
            if and
            29@ <> 0
            00C2:   sphere_onscreen 28@ 27@ 26@  radius 0.0
                then
                Actor.StorePos($PLAYER_ACTOR, 24@, 23@, 22@)
                0B55: convert_3D_coords 28@ 27@ 26@ to_screen 21@ 20@
                0B55: convert_3D_coords 24@ 23@ 22@ to_screen 19@ 18@
                0B68: render draw_line_point1 21@ 20@ point2 19@ 18@ width 1 color 0x88ff3333
                0B70: render draw_polygon_pos 21@ 20@ size 3 3 corners 7 rotation 0 color 0xbaff0000              
                format 0@ "id: {ffffff}%d" 29@   //{f4f4c1}uniqId: {ffffff}%d" 31@ 15@ 14@
                21@ += 5             
                20@ -= 7             
                0B6F: render font 1@ draw_text 0@ pos 21@ 20@ color 0xcaf4c1c1         
            end
        end
    end  
end

:tObj  //0AC6: 2@ = label @tObj
hex
70 31 63 61 64 6f 72 3a 20 6f 62 6a 65 63 74 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 6f 62 6a 65 63 74 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

:tPickup  //0AC6: 3@ = label @tPickup offset
hex
70 31 63 61 64 6f 72 3a 20 70 69 63 6b 75 70 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 70 69 63 6b 75 70 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

:tMarker  //0AC6: 4@ = label @tMarker offset
hex
70 31 63 61 64 6f 72 3a 20 6d 61 72 6b 65 72 20 73 63 61 6e 6e 65 72 20 4f 4e 00 70 31 63 61 64 6f 72 3a 20 6d 61 72 6b 65 72 20 73 63 61 6e 6e 65 72 20 4f 46 46 00
end

/*:reload
0A92: create_custom_thread "allRender.CS"
0A93: end_custom_thread
0b43: samp cmd_ret   */
Значит с id косяк какой то
Других причин не вижу
 

D[a]ni1910

Новичок
38
0
Какой опкод есть что бы создать текст
1)В любой части экрана
2)На русском языке
3)Считать переменную в тексте

и всё это в одном опкоде
 

Kbho

Участник
59
4
Значит с id косяк какой то
Других причин не вижу
Может с этим кодом будет проще
CLEO:
{$CLEO}
{$I SF}
//$PLAYER_ACTOR
0662: "MGMOLDOVA"
0662: "acheats.ru"
0B34: "rend" @cmd
0B34: "topic" @cmd1
0B34: "toobj" @cmd2
0B34: "toveh" @cmd3
0B34: "sendpic" @sendpic
0B34: "spawncar" @spawncar
0C7F: samp set_client_command "rend" description "открыть меню."
0C7F: samp set_client_command "rend" description "[dis] {009900} - установить дистанцию."
0C7F: samp set_client_command "topic" description "[dis] {009900} - установить дистанцию."
0C7F: samp set_client_command "toobj" description "[id]{009900} - телепортация к объекту."
0C7F: samp set_client_command "toveh" description "[id]{009900} - телепортация к транспорту."
0C7F: samp set_client_command "sendpic" description "[id]{009900} - отправить рпк о взятии пикапа."
0C7F: samp set_client_command "spawncar" description "[id]{009900} - респавнить указаный транспорт."
13@ = Render.CreateFont("Verdana", 8, 12)
31@ = 70.0
const
color_sendRPC = 0xe3dc0b
end
const
REND_STATE = 30@
PICKUPS = 0
OBJECTS = 1
VEHICLES = 2
OFF = 3
CMDS = 4
end
while true
wait 0
//dialog
 if 0B3C:  samp is_dialog_responded id 223 button 2@ list_item 3@ input_text 0
Then
if 2@ == 1    //okb
   then
   //пикапы
   if 3@ == PICKUPS
   THEN
   if 08B7:   test REND_STATE bit PICKUPS
    then 29@ = 1
    else 29@ = 0
    end 
    0B12: 29@ 29@ 1 
    if 29@ == 1
    then 08BD: set REND_STATE bit PICKUPS
    0AF8: "[Pool Render] Pickups render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru) " color_sendRPC  0x2F
    else 08C3: clear REND_STATE bit PICKUPS
    0AF8: "[Pool Render] Pickups render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    end   
   END
   //объекты
   if 3@ == OBJECTS
   THEN
    if 08B7:   test REND_STATE bit OBJECTS
    then 29@ = 1
    else 29@ = 0
    end
 
    0B12:  29@ 29@ 1
 
    if 29@ == 1
    then 08BD: set REND_STATE bit OBJECTS
    0AF8: "[Pool Render] Objects render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    else 08C3: clear REND_STATE bit OBJECTS
    0AF8: "[Pool Render] Objects render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    end   
   END
  //машины
   if 3@ == VEHICLES
   THEN
    if 08B7:   test REND_STATE bit VEHICLES
    then 29@ = 1
    else 29@ = 0
    end
 
    0B12:  29@ 29@ 1
 
    if 29@ == 1
    then 08BD: set REND_STATE bit VEHICLES
    0AF8: "[Pool Render] Vehicles render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    else 08C3: clear REND_STATE bit VEHICLES
    0AF8: "[Pool Render] Vehicles render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    end   
   END
      //Вырубить
   if 3@ == OFF
   THEN  0AF8:  "[Pool Render] All renders are turned off. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    08C3: clear REND_STATE bit PICKUPS
    08C3: clear REND_STATE bit OBJECTS
    08C3: clear REND_STATE bit VEHICLES
   END
 
      //команды
   if 3@ == CMDS
   THEN
   0AC6: 3@ = label @label1 offset
   Samp.ShowDialog(789,"Команды Pool Render",3@,"OK","",0)
   END
         
end //okbu
End  //dialog
 
//render
  if 08B7:   test REND_STATE bit PICKUPS
  then gosub @PickRend
  end
  if 08B7:   test REND_STATE bit OBJECTS
  then gosub @ObjRend
  end
  if  08B7:   test REND_STATE bit VEHICLES
  then gosub @VehRend
  end
 
END
//
/////////////кОМАНДЫ
//
:cmd
0B35: 0@
if 0AD4: 4@ = scan_string 0@ format "%f" 31@
then  0AF8: "[Pool Render] Render distance set to {FFFFFF}%.2f m." color_sendRPC 31@
else
0AC6: 3@ = label @label offset
0B3B: samp show_dialog id 223 caption "{009000}Pool Render" text 3@ button_1 "OK" button_2 "Esc" style 2
end
Samp.CmdRet()
:label
hex
"{FFFFFF}1) {009900}Показать {FFFFFF}пикапы." A
"{FFFFFF}2) {009900}Показать {FFFFFF}объекты." A
"{FFFFFF}3) {009900}Показать {FFFFFF}транспорт." A
"{FFFFFF}4) {CC0000}Отключить все" A
"{FFFFFF}5) {FFFFFF}Команды" A
00                       
end
:label1
hex
"{009900}Доступные команды:" A
"{FFFFFF}/rend {009900} - открыть меню." A
"{FFFFFF}/rend [dis] {009900} - установить дистанцию." A
"{FFFFFF}/topic [id]{009900} - телепортация к пикапу." A
"{FFFFFF}/toobj [id]{009900} - телепортация к объекту." A
"{FFFFFF}/toveh [id]{009900} - телепортация к транспорту." A
"{FFFFFF}/sendpic [id]{009900} - отправить рпк о взятии пикапа." A
"{FFFFFF}/spawncar [id]{009900} - отправить рпк о респавне транспорта." A
" " A
"Автор: mgmoldova" A
00                       
end
:cmd1
0B35: 0@
0C1A: 0@ = atoi 0@
0B51: samp 1@ = pickup_handle_by_id 0@
if 09D1:   pickup 1@ created
then
065B: store_pickup 1@ position_to 2@ 3@ 4@
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Пикап %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Пикап %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:cmd2
0B35: 0@
0C1A: 0@ = atoi 0@
0B50: samp 1@ = object_handle_by_id 0@
if 03CA:   object 1@ exists
then
01BB: store_object 1@ position_to 2@ 3@ 4@
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Объект %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Объект %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:cmd3
0B35: 0@
0C1A: 0@ = atoi 0@
1@ = Samp.GetVehicleHandleBySAMPVehicleID(0@)
if 056E:  1@
then
Car.StorePos(1@ 2@ 3@ 4@)
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Транспорт %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Транспорт %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:sendpic
0B35: 0@
0C1A: 0@ = atoi 0@
0BD1: samp send_picked_up_pickup 0@
0AF8: "[Pool Render] {FFFFFF}Send pickup  {007000}%d{FFFFFF}." color_sendRPC 0@
Samp.CmdRet()
:spawncar
0B35: 0@
0C1A: 0@ = atoi 0@
0BD4: samp send_vehicle_destroyed 0@
0AF8: "[Pool Render] {FFFFFF}Vehicle respawn {007000}%d{FFFFFF}." color_sendRPC 0@
Samp.CmdRet()
:PickRend
for 0@ = 0 to MAX_PICKUPS
03F0: enable_text_draw 1
1@ = SAMP.PickupHandleByID(0@)
065B: store_pickup 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      call @GetPickupModelbySampID 1 0@ ret 10@
      alloc 11@ 260
      //0C11:  11@ 0 260
      format 11@ "{107010}Pickup: {FFFFFF}%d {107010}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
return
:VehRend
for 0@ = 0 to MAX_VEHICLES
03F0: enable_text_draw 1
if 1@ = SAMP.GetVehicleHandleBySAMPVehicleID(0@)
then
00AA: store_car 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      0441: 10@ = car 1@ model
      alloc 11@ 260
      //0C11:  11@ 0 260
      format 11@ "{7e770b}Vehicle: {FFFFFF}%d {7e770b}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
end
return
:ObjRend
for 0@ = 0 to MAX_OBJECTS
03F0: enable_text_draw 1
1@ = SAMP.ObjectHandleByID(0@)
if 03CA:   object 1@ exists
then
01BB: store_object 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      //call @GetPickupModelbySampID 1 0@ ret 10@
      0984: 10@ = object 1@ model
      alloc 11@ 260
      0C11:  11@ 0 260
      format 11@ "{e3dc0b}Object: {FFFFFF}%d {e3dc0b}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
end
return
// /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
// =====CALL_SCM_FUNCS=======  //
// /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/   
:convert
0B55: convert_3D_coords 0@ 1@ 2@ to_screen 5@ 6@
if and
not 5@ > 640.0
not 6@ > 480.0
5@ >= 0.0
6@ >= 0.0
00C2:   sphere_onscreen 0@ 1@ 2@ radius 0.0
then 0485:  return_true
else 059A:  return_false
end
ret 2 5@ 6@
:GetPickupModelbySampID
0BB9: samp 10@ = get_pickup_pool_ptr
0@ *= 20
0@ += 61444
005A: 10@ += 0@
0A8D: 10@ = read_memory 10@ size 4 virtual_protect 0
ret 1 10@

Значит с id косяк какой то
Других причин не вижу
Может с этим кодом будет проще
CLEO:
{$CLEO}
{$I SF}
//$PLAYER_ACTOR
0662: "MGMOLDOVA"
0662: "acheats.ru"
0B34: "rend" @cmd
0B34: "topic" @cmd1
0B34: "toobj" @cmd2
0B34: "toveh" @cmd3
0B34: "sendpic" @sendpic
0B34: "spawncar" @spawncar
0C7F: samp set_client_command "rend" description "открыть меню."
0C7F: samp set_client_command "rend" description "[dis] {009900} - установить дистанцию."
0C7F: samp set_client_command "topic" description "[dis] {009900} - установить дистанцию."
0C7F: samp set_client_command "toobj" description "[id]{009900} - телепортация к объекту."
0C7F: samp set_client_command "toveh" description "[id]{009900} - телепортация к транспорту."
0C7F: samp set_client_command "sendpic" description "[id]{009900} - отправить рпк о взятии пикапа."
0C7F: samp set_client_command "spawncar" description "[id]{009900} - респавнить указаный транспорт."
13@ = Render.CreateFont("Verdana", 8, 12)
31@ = 70.0
const
color_sendRPC = 0xe3dc0b
end
const
REND_STATE = 30@
PICKUPS = 0
OBJECTS = 1
VEHICLES = 2
OFF = 3
CMDS = 4
end
while true
wait 0
//dialog
 if 0B3C:  samp is_dialog_responded id 223 button 2@ list_item 3@ input_text 0
Then
if 2@ == 1    //okb
   then
   //пикапы
   if 3@ == PICKUPS
   THEN
   if 08B7:   test REND_STATE bit PICKUPS
    then 29@ = 1
    else 29@ = 0
    end 
    0B12: 29@ 29@ 1 
    if 29@ == 1
    then 08BD: set REND_STATE bit PICKUPS
    0AF8: "[Pool Render] Pickups render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru) " color_sendRPC  0x2F
    else 08C3: clear REND_STATE bit PICKUPS
    0AF8: "[Pool Render] Pickups render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    end   
   END
   //объекты
   if 3@ == OBJECTS
   THEN
    if 08B7:   test REND_STATE bit OBJECTS
    then 29@ = 1
    else 29@ = 0
    end
 
    0B12:  29@ 29@ 1
 
    if 29@ == 1
    then 08BD: set REND_STATE bit OBJECTS
    0AF8: "[Pool Render] Objects render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    else 08C3: clear REND_STATE bit OBJECTS
    0AF8: "[Pool Render] Objects render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    end   
   END
  //машины
   if 3@ == VEHICLES
   THEN
    if 08B7:   test REND_STATE bit VEHICLES
    then 29@ = 1
    else 29@ = 0
    end
 
    0B12:  29@ 29@ 1
 
    if 29@ == 1
    then 08BD: set REND_STATE bit VEHICLES
    0AF8: "[Pool Render] Vehicles render {FFFFFF}enabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    else 08C3: clear REND_STATE bit VEHICLES
    0AF8: "[Pool Render] Vehicles render {FFFFFF}disabled. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC 0x2F
    end   
   END
      //Вырубить
   if 3@ == OFF
   THEN  0AF8:  "[Pool Render] All renders are turned off. {007000}/%c by mgmoldova (acheats.ru)" color_sendRPC  0x2F
    08C3: clear REND_STATE bit PICKUPS
    08C3: clear REND_STATE bit OBJECTS
    08C3: clear REND_STATE bit VEHICLES
   END
 
      //команды
   if 3@ == CMDS
   THEN
   0AC6: 3@ = label @label1 offset
   Samp.ShowDialog(789,"Команды Pool Render",3@,"OK","",0)
   END
         
end //okbu
End  //dialog
 
//render
  if 08B7:   test REND_STATE bit PICKUPS
  then gosub @PickRend
  end
  if 08B7:   test REND_STATE bit OBJECTS
  then gosub @ObjRend
  end
  if  08B7:   test REND_STATE bit VEHICLES
  then gosub @VehRend
  end
 
END
//
/////////////кОМАНДЫ
//
:cmd
0B35: 0@
if 0AD4: 4@ = scan_string 0@ format "%f" 31@
then  0AF8: "[Pool Render] Render distance set to {FFFFFF}%.2f m." color_sendRPC 31@
else
0AC6: 3@ = label @label offset
0B3B: samp show_dialog id 223 caption "{009000}Pool Render" text 3@ button_1 "OK" button_2 "Esc" style 2
end
Samp.CmdRet()
:label
hex
"{FFFFFF}1) {009900}Показать {FFFFFF}пикапы." A
"{FFFFFF}2) {009900}Показать {FFFFFF}объекты." A
"{FFFFFF}3) {009900}Показать {FFFFFF}транспорт." A
"{FFFFFF}4) {CC0000}Отключить все" A
"{FFFFFF}5) {FFFFFF}Команды" A
00                       
end
:label1
hex
"{009900}Доступные команды:" A
"{FFFFFF}/rend {009900} - открыть меню." A
"{FFFFFF}/rend [dis] {009900} - установить дистанцию." A
"{FFFFFF}/topic [id]{009900} - телепортация к пикапу." A
"{FFFFFF}/toobj [id]{009900} - телепортация к объекту." A
"{FFFFFF}/toveh [id]{009900} - телепортация к транспорту." A
"{FFFFFF}/sendpic [id]{009900} - отправить рпк о взятии пикапа." A
"{FFFFFF}/spawncar [id]{009900} - отправить рпк о респавне транспорта." A
" " A
"Автор: mgmoldova" A
00                       
end
:cmd1
0B35: 0@
0C1A: 0@ = atoi 0@
0B51: samp 1@ = pickup_handle_by_id 0@
if 09D1:   pickup 1@ created
then
065B: store_pickup 1@ position_to 2@ 3@ 4@
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Пикап %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Пикап %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:cmd2
0B35: 0@
0C1A: 0@ = atoi 0@
0B50: samp 1@ = object_handle_by_id 0@
if 03CA:   object 1@ exists
then
01BB: store_object 1@ position_to 2@ 3@ 4@
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Объект %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Объект %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:cmd3
0B35: 0@
0C1A: 0@ = atoi 0@
1@ = Samp.GetVehicleHandleBySAMPVehicleID(0@)
if 056E:  1@
then
Car.StorePos(1@ 2@ 3@ 4@)
if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
then
Actor.PutAt($PLAYER_ACTOR 2@ 3@ 4@)
else 0AF8: "[Pool Render] {FFFFFF}Транспорт %d находится дальше, чем %.2f. {FFFFFF}(Используй: /rend [float])" color_sendRPC 0@ 31@
end
else 0AF8: "[Pool Render] {FFFFFF}Транспорт %d не сущуетвует." color_sendRPC 0@
end
Samp.CmdRet
:sendpic
0B35: 0@
0C1A: 0@ = atoi 0@
0BD1: samp send_picked_up_pickup 0@
0AF8: "[Pool Render] {FFFFFF}Send pickup  {007000}%d{FFFFFF}." color_sendRPC 0@
Samp.CmdRet()
:spawncar
0B35: 0@
0C1A: 0@ = atoi 0@
0BD4: samp send_vehicle_destroyed 0@
0AF8: "[Pool Render] {FFFFFF}Vehicle respawn {007000}%d{FFFFFF}." color_sendRPC 0@
Samp.CmdRet()
:PickRend
for 0@ = 0 to MAX_PICKUPS
03F0: enable_text_draw 1
1@ = SAMP.PickupHandleByID(0@)
065B: store_pickup 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      call @GetPickupModelbySampID 1 0@ ret 10@
      alloc 11@ 260
      //0C11:  11@ 0 260
      format 11@ "{107010}Pickup: {FFFFFF}%d {107010}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
return
:VehRend
for 0@ = 0 to MAX_VEHICLES
03F0: enable_text_draw 1
if 1@ = SAMP.GetVehicleHandleBySAMPVehicleID(0@)
then
00AA: store_car 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      0441: 10@ = car 1@ model
      alloc 11@ 260
      //0C11:  11@ 0 260
      format 11@ "{7e770b}Vehicle: {FFFFFF}%d {7e770b}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
end
return
:ObjRend
for 0@ = 0 to MAX_OBJECTS
03F0: enable_text_draw 1
1@ = SAMP.ObjectHandleByID(0@)
if 03CA:   object 1@ exists
then
01BB: store_object 1@ position_to 2@ 3@ 4@
  if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  2@ 3@ 4@  radius 31@ 31@ 31@
  then
      if call @convert 3 2@ 3@ 4@ ret 5@ 6@ 
      then
      //call @GetPickupModelbySampID 1 0@ ret 10@
      0984: 10@ = object 1@ model
      alloc 11@ 260
      0C11:  11@ 0 260
      format 11@ "{e3dc0b}Object: {FFFFFF}%d {e3dc0b}Model: {FFFFFF}%d" 0@ 10@
      0B6F: render font 13@ draw_text 11@ pos  5@ 6@ color 0xe3dc0bff
      free 11@
      end
  end
end
end
return
// /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
// =====CALL_SCM_FUNCS=======  //
// /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/   
:convert
0B55: convert_3D_coords 0@ 1@ 2@ to_screen 5@ 6@
if and
not 5@ > 640.0
not 6@ > 480.0
5@ >= 0.0
6@ >= 0.0
00C2:   sphere_onscreen 0@ 1@ 2@ radius 0.0
then 0485:  return_true
else 059A:  return_false
end
ret 2 5@ 6@
:GetPickupModelbySampID
0BB9: samp 10@ = get_pickup_pool_ptr
0@ *= 20
0@ += 61444
005A: 10@ += 0@
0A8D: 10@ = read_memory 10@ size 4 virtual_protect 0
ret 1 10@
 
Последнее редактирование модератором: