CLEO Help cmd screenshot when a message appear on chat

CLEO related

asfddasfs

Member
Joined
Nov 21, 2021
Messages
12
Reaction score
0
Location
asd
is possible to make a cmd that automatically screenshot the game ( F8 ) when a specific word appear on chat?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania

Well here was similar request , instead chat he wanted dialog.

P.S. For which samp version you looking?
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
458
Solutions
9
Reaction score
166
Location
Poland
Type SCR to active.
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 30@ = 30@ XOR 1      
    IF 0039:   30@ == TRUE
    THEN 0AD1: show_formatted_text_highpriority "~w~Script ~g~ON" time 1337
    ELSE 0AD1: show_formatted_text_highpriority "~w~Script ~r~OFF" time 137
    END
END

IF 30@ == TRUE
THEN
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 1{0.3.7 R1} ChatID 99 _Returned: Text 0@ PrefixText 2@ Color 3@ PrefixColor 4@
    0AC8: 1@ = allocate_memory_size 260
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "test"
    IF 0AB1: @IfTextContains 2 String1 1@ String2 5@ _Returned: Text 6@
    THEN
        0AB1: @TakeScreenShot 1 SampVersionID 1{0.3.7 R1}
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~g~Done!" time 5000
        WAIT 30000 
    END
END

END
0A93: terminate_this_custom_script
 

Attachments

  • Script.cs
    27.9 KB · Views: 12

asfddasfs

Member
Joined
Nov 21, 2021
Messages
12
Reaction score
0
Location
asd
Type SCR to active.
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 30@ = 30@ XOR 1     
    IF 0039:   30@ == TRUE
    THEN 0AD1: show_formatted_text_highpriority "~w~Script ~g~ON" time 1337
    ELSE 0AD1: show_formatted_text_highpriority "~w~Script ~r~OFF" time 137
    END
END

IF 30@ == TRUE
THEN
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 1{0.3.7 R1} ChatID 99 _Returned: Text 0@ PrefixText 2@ Color 3@ PrefixColor 4@
    0AC8: 1@ = allocate_memory_size 260
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "test"
    IF 0AB1: @IfTextContains 2 String1 1@ String2 5@ _Returned: Text 6@
    THEN
        0AB1: @TakeScreenShot 1 SampVersionID 1{0.3.7 R1}
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~g~Done!" time 5000
        WAIT 30000
    END
END

END
0A93: terminate_this_custom_script
it works for the first time but after it doesnt want to take anymore screenshots
 

asfddasfs

Member
Joined
Nov 21, 2021
Messages
12
Reaction score
0
Location
asd
Type SCR to active.
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 30@ = 30@ XOR 1     
    IF 0039:   30@ == TRUE
    THEN 0AD1: show_formatted_text_highpriority "~w~Script ~g~ON" time 1337
    ELSE 0AD1: show_formatted_text_highpriority "~w~Script ~r~OFF" time 137
    END
END

IF 30@ == TRUE
THEN
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 1{0.3.7 R1} ChatID 99 _Returned: Text 0@ PrefixText 2@ Color 3@ PrefixColor 4@
    0AC8: 1@ = allocate_memory_size 260
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "test"
    IF 0AB1: @IfTextContains 2 String1 1@ String2 5@ _Returned: Text 6@
    THEN
        0AB1: @TakeScreenShot 1 SampVersionID 1{0.3.7 R1}
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~g~Done!" time 5000
        WAIT 30000
    END
END

END
0A93: terminate_this_custom_script
can u make it work even when the game is minimized?
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
458
Solutions
9
Reaction score
166
Location
Poland
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WAIT 8500
0AB1: @memset 3 destination 7623723 value 144 size 8

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 30@ = 30@ XOR 1        
    IF 0039:   30@ == TRUE
    THEN 0AD1: show_formatted_text_highpriority "~w~Script ~g~ON" time 1337
    ELSE 0AD1: show_formatted_text_highpriority "~w~Script ~r~OFF" time 137
    END
END

IF 30@ == TRUE
THEN
    0A8C: write_memory 7634870 size 1 value 1 virtual_protect 1
    0A8C: write_memory 7635034 size 1 value 1 virtual_protect 1
    0AB1: @memset 3 destination 5499528 value 144 size 6 // disable esc when game is minimized
    0AB1: @memset 3 destination 7623723 value 144 size 8 // disable mouse centering
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 1{0.3.7 R1} ChatID 99 _Returned: Text 0@ PrefixText 2@ Color 3@ PrefixColor 4@
    0AC8: 1@ = allocate_memory_size 260
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "test"
    IF 0AB1: @IfTextContains 2 String1 1@ String2 5@ _Returned: Text 6@
    THEN
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~1.0.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.8.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.6.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.4.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.2.." time 200
        WAIT 200
        0AB1: @TakeScreenShot 1 SampVersionID 1{0.3.7 R1}
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~g~Done!" time 3000
        WAIT 3000   
    END
ELSE
    0A8C: write_memory 7634870 size 1 value 0 virtual_protect 1
    0A8C: write_memory 7635034 size 1 value 0 virtual_protect 1
    0AC6: 2@ = label @SOMETHING1 offset
    0AB1: @memcpy 3 destination 5499528 source 2@ size 6
    0AC6: 3@ = label @SOMETHING2 offset
    0AB1: @memcpy 3 destination 7623723 source 3@ size 8    
END

END
0A93: terminate_this_custom_script
 

Attachments

  • scr.cs
    30.4 KB · Views: 3

asfddasfs

Member
Joined
Nov 21, 2021
Messages
12
Reaction score
0
Location
asd
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WAIT 8500
0AB1: @memset 3 destination 7623723 value 144 size 8

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 30@ = 30@ XOR 1       
    IF 0039:   30@ == TRUE
    THEN 0AD1: show_formatted_text_highpriority "~w~Script ~g~ON" time 1337
    ELSE 0AD1: show_formatted_text_highpriority "~w~Script ~r~OFF" time 137
    END
END

IF 30@ == TRUE
THEN
    0A8C: write_memory 7634870 size 1 value 1 virtual_protect 1
    0A8C: write_memory 7635034 size 1 value 1 virtual_protect 1
    0AB1: @memset 3 destination 5499528 value 144 size 6 // disable esc when game is minimized
    0AB1: @memset 3 destination 7623723 value 144 size 8 // disable mouse centering
    0AC8: 0@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 1{0.3.7 R1} ChatID 99 _Returned: Text 0@ PrefixText 2@ Color 3@ PrefixColor 4@
    0AC8: 1@ = allocate_memory_size 260
    0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
    0AC8: 5@ = allocate_memory_size 1024
    0AD3: 5@ = format "test"
    IF 0AB1: @IfTextContains 2 String1 1@ String2 5@ _Returned: Text 6@
    THEN
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~1.0.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.8.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.6.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.4.." time 200
        WAIT 200
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~y~0.2.." time 200
        WAIT 200
        0AB1: @TakeScreenShot 1 SampVersionID 1{0.3.7 R1}
        0AD1: show_formatted_text_highpriority "~w~Screenshot ~g~Done!" time 3000
        WAIT 3000  
    END
ELSE
    0A8C: write_memory 7634870 size 1 value 0 virtual_protect 1
    0A8C: write_memory 7635034 size 1 value 0 virtual_protect 1
    0AC6: 2@ = label @SOMETHING1 offset
    0AB1: @memcpy 3 destination 5499528 source 2@ size 6
    0AC6: 3@ = label @SOMETHING2 offset
    0AB1: @memcpy 3 destination 7623723 source 3@ size 8   
END

END
0A93: terminate_this_custom_script
still doesn't want to work, it says screenshot taken but in the folder there is no screenshot, and can u make it to auto activate when i enter the game without the need to type a command?
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
458
Solutions
9
Reaction score
166
Location
Poland
Working perfectly. Try on clean GTA SA.
PHP:
30@ = 1 // autostart

WHILE TRUE
WAIT 0
 

Attachments

  • scr.cs
    30.4 KB · Views: 7
Top