CLEO Help Crash

CLEO related

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
300
Reaction score
36
Location
Srbija
Hi, can anyone try this script, for me it crash when i join in game... its parazitas dialog

Code:
{$CLEO .cs}

0000:   

0B6D: 30@ CREATE_FONT "FangSong" HEIGHT 15 FLAGS 1
0BFC: set_global_var "font1" = 30@
0B6D: 31@ CREATE_FONT "FangSong" HEIGHT 12 FLAGS 1
0BFC: set_global_var "font2" = 31@   

0AB3: var 1 = 0
0AB3: var 2 = 0
0AB3: var 3 = 0
0AB3: var 4 = 0
0AB3: var 5 = 0
                                  

29@ = false /// Default toggle control

WHILE TRUE
WAIT 0

IF
0ADC:   test_cheat "AIM" /// Get Menu
THEN
    IF
    29@ == false
    THEN
        018C: play_sound 1083 at 0.0 0.0 0.0
        wait 350
        29@ = true
    ELSE       
        018C: play_sound 1084 at 0.0 0.0 0.0
        0B8D: samp set_cursor_mode 0
        wait 350
        29@ = false
    END
END

IF AND
8B5C:  samp not_player $PLAYER_ACTOR paused
29@ == true
THEN
    0B8D: samp set_cursor_mode 2
    03F0: enable_text_draw 1
    //0930: lock_camera_position 1
    0AB1: @GetCursorPos 0 0@ 1@
    0AB1: @getFullScreenXY 2 CursorX 0@ CursorY 1@ conver_to 0@ 1@
    //0AD1: showtf "%d : %d" time 1 ms | X 0@ Y 1@
    //0AF8: samp add_message_to_chat "%d + %d" color 0xFF61BB 0@ 1@
    0093: 0@ = integer 0@ to_float
    0093: 1@ = integer 1@ to_float      // plotis : zemyn
    038E: draw_box_position 180.0 224.0 size 100.0 170.0 RGBA 43 43 43 255 // MAIN BOX
    038E: draw_box_position 180.0 170.0 size 100.0 0.8 RGBA 66 195 227 255 // BLUE LINE BEFORE TITLE
    
    ////////////////////////////////////////////////////// Menu ////////////////////////////////////////////
    if // Aim
    05A5:   is_area_center 0@ 1@ scale 4.0 4.0 overlaping_area_center 179.0 189.0 scale {plotis}95.0 {Zemyn}20.0
    then
        038E: draw_box_position 180.0 189.0 size {plotis}100.0 {Zemyn}25.0 RGBA 66 195 227 255 // Css Efect  Aim
    end
    
    if // Trigger
    05A5:   is_area_center 0@ 1@ scale 4.0 4.0 overlaping_area_center 179.0 214.0 scale {plotis}95.0 {Zemyn}20.0
    then
        038E: draw_box_position 180.0 215.0 size {plotis}100.0 {Zemyn}25.0 RGBA 66 195 227 255 // Css Efect Trigger
    end
    
    if // Skin Ignore
    05A5:   is_area_center 0@ 1@ scale 4.0 4.0 overlaping_area_center 179.0 238.0 scale {plotis}95.0 {Zemyn}20.0
    then
        038E: draw_box_position 180.0 241.0 size {plotis}100.0 {Zemyn}25.0 RGBA 66 195 227 255 // Css Efect Skin Ignore
    end
    
    if // Position
    05A5:   is_area_center 0@ 1@ scale 4.0 4.0 overlaping_area_center 179.0 264.0 scale {plotis}95.0 {Zemyn}20.0
    then
        038E: draw_box_position 180.0 267.0 size {plotis}100.0 {Zemyn}25.0 RGBA 66 195 227 255 // Css Efect Position
    end
    
    if // Visual
    05A5:   is_area_center 0@ 1@ scale 4.0 4.0 overlaping_area_center 179.0 288.0 scale {plotis}95.0 {Zemyn}20.0
    then
        038E: draw_box_position 180.0 294.0 size {plotis}100.0 {Zemyn}25.0 RGBA 66 195 227 255 // Css Efect ESP
    end
    
    
    //////////////////////////////////////// Menu title and button titles ///////////////////////////////////////
    0AB1: @DRAW_TITLE_WITH_TEXT_PARAZITAS 2 X 310 Y 238
    0AB1: @DRAW_BUTTON_WITH_TEXT_AIM 2 X 272 Y 295
    0AB1: @DRAW_BUTTON_WITH_TEXT_TRIGGER 2 X 272 Y 335
    0AB1: @DRAW_BUTTON_WITH_TEXT_SKIN_IGNORE 2 X 272 Y 375
    0AB1: @DRAW_BUTTON_WITH_TEXT_POSITION 2 X 272 Y 415
    0AB1: @DRAW_BUTTON_WITH_TEXT_ESP 2 X 272 Y 455
END

END // END WHILE TRUE       
      

:getFullScreenXY
2@ = 640.0 // screen X
0A8D: 4@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X
0093: 4@ = integer 4@ to_float
0073: 2@ /= 4@
006B: 0@ *= 2@
3@ = 448.0 // screen Y
0A8D: 5@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y
0093: 5@ = integer 5@ to_float
0073: 3@ /= 5@
006B: 1@ *= 3@
0AB2: ret 2 0@ 1@

:GetCursorPos
// 0AB1: call @GetCursorPos 0 3@ 4@
0AA2: 0@ = load_library "user32.dll"
0AA4: 1@ = get_proc_address "GetCursorPos" library 0@
0AC7: 2@ = var 5@ offset
0AA5: call 1@ num_params 1 pop 0 2@
0A8D: 3@ = read_memory 2@ size 4 virtual_protect 0
2@ += 4
0A8D: 4@ = read_memory 2@ size 4 virtual_protect 0
0AB2: ret 2 3@ 4@

:DRAW_TITLE_WITH_TEXT_PARAZITAS
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    //0AB1: @GetCursorPos 0 1@ 2@
    //0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@
    0BFD: 30@ = get_global_var "font1"
    0B6F: FONT 30@ DRAW_TEXT "Parazitas" POS 0@ 1@ COLOR 0xFF42C3E3
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0



:DRAW_BUTTON_WITH_TEXT_AIM
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    /*0AB1: @GetCursorPos 0 1@ 2@
    0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@ */
    0BFD: 31@ = get_global_var "font2" // 272 298
    0B6F: FONT 31@ DRAW_TEXT "Aim" POS 0@ 1@ COLOR 0xFFFFFFFF
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0

:DRAW_BUTTON_WITH_TEXT_TRIGGER                           
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    /*0AB1: @GetCursorPos 0 1@ 2@
    0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@ */
    0BFD: 31@ = get_global_var "font2" // 272 298           
    0B6F: FONT 31@ DRAW_TEXT "Trigger" POS 0@ 1@ COLOR 0xFFFFFFFF
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0

:DRAW_BUTTON_WITH_TEXT_SKIN_IGNORE
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    /*0AB1: @GetCursorPos 0 1@ 2@
    0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@ */
    0BFD: 31@ = get_global_var "font2" // 272 298
    0B6F: FONT 31@ DRAW_TEXT "Ignore" POS 0@ 1@ COLOR 0xFFFFFFFF   /// Ignore color , skin, nick name.
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0

:DRAW_BUTTON_WITH_TEXT_POSITION
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    /*0AB1: @GetCursorPos 0 1@ 2@
    0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@ */
    0BFD: 31@ = get_global_var "font2" // 272 298
    0B6F: FONT 31@ DRAW_TEXT "Visual" POS 0@ 1@ COLOR 0xFFFFFFFF
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0

:DRAW_BUTTON_WITH_TEXT_ESP
if or
044B:   actor $PLAYER_ACTOR on_foot
00DF:   actor $PLAYER_ACTOR driving
0818:   actor $PLAYER_ACTOR in_air
then
    /*0AB1: @GetCursorPos 0 1@ 2@
    0AB1: @getFullScreenXY 2 CursorX 1@ CursorY 2@ to 4@ 5@ */
    0BFD: 31@ = get_global_var "font2" // 272 298
    0B6F: FONT 31@ DRAW_TEXT "Other" POS 0@ 1@ COLOR 0xFFFFFFFF
//  0B6C: render 2@ = font 1@ draw_height /// Get Text Height
//  0B6B: render 3@ = font 1@ draw_text 2@ length /// Get Text Lenght
end
0AB2: 0
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
Always keep in mind that if the script is using SAMPFUNCS Opcodes that requires samp.dll to be loaded. Always put this block before any SAMP related opcodes, I advise to put it at the beginning of the script:
PHP:
Repeat
    Wait 0
Until 0AFA: is_samp_available

In your case:
PHP:
{$CLEO}
0000:

Repeat
    Wait 0
Until 0AFA: is_samp_available 

... // All samp related operation here
 
Top