CLEO Help Pause script and play after 10 secund

CLEO related

Angel9

Active member
Joined
May 6, 2021
Messages
65
Reaction score
2
Location
Belgrade, Serbia
How to automatically pause the script when the text "{FFFFFF} You have successfully purchased the phone" is printed in the chat and continue working after 10 seconds?

Code:
{$CLEO .cs}

0000: NOP

wait 10000 // 10sec Redy

while true
wait 0

if
0ADC:   test_cheat "ON" // ON
then
    0@ = true
    0AD1: show_formatted_text_highpriority "test...." time 2000
end

if
0@ == true
then // 1
                        0B4C:  samp is_dialog_active -1
                        0AF9: samp say_msg "/aly" // command
                        wait 250 // time waiting
                        0B49: samp set_current_dialog_list_item 15 // item
                        0B47: samp close_current_dialog_with_button 1 // close
                        wait 250
                        1@ += 1 // counter

end

if 1@ >= 50 //
then       //
     0B4C:  samp is_dialog_active -1
     0AF9: samp say_msg "/kya" // command
     wait 250
     0B49: samp set_current_dialog_list_item 4 // item
     0B47: samp close_current_dialog_with_button 1
     wait 250
     0B49: samp set_current_dialog_list_item 2 // item
     0B47: samp close_current_dialog_with_button 1
     wait 250
     0B4B: samp set_current_dialog_editbox_text "155" // type text
     0B47: samp close_current_dialog_with_button 1
     wait 250
     1@ = 0 // restart loop
end       
end // end
return //
0AB2: 0
 

Angel9

Active member
Joined
May 6, 2021
Messages
65
Reaction score
2
Location
Belgrade, Serbia
I tried but it doesn't work as if skipping the check because it doesn't stop the script for 10 seconds even if the ping is over 70

Code:
                        0B2B: samp 24@ = get_player_id_by_actor_handle $PLAYER_ACTOR
                        0B2A: samp 24@ = get_player_ping 20@
                        if 20@  >= 70
                        then
                        Wait 10000
                       
end
 

Juli4n

Active member
Joined
Mar 31, 2021
Messages
43
Solutions
1
Reaction score
19
Location
Argentina
C#:
                        0B2B: samp 24@ = get_player_id_by_actor_handle $PLAYER_ACTOR
                        0B2A: samp 25@ = get_player_ping 24@
                        if 25@  >= 70
                        then
                            Wait 10000
                        end
 
Top