CLEO Help I need help with a timer

CLEO related
Status
Not open for further replies.

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
Hi everyone, I was trying to make a timer that has the option to turn on / off, but it did not work, what is wrong?

Code:
{$CLEO}
{$USE INI}
{$USE CLEO+}


:Main_01
thread 'Main'
repeat
wait 0
until 0AFA: is_samp_structures_available

0AF0: 4@ = get_int_from_ini_file "cleo\ini\test.ini" section "config" key "on/off"

:Main_02
wait 0
alloc 4@ 260
if and
  8B21:     samp not_chat_opened
  8B4C:  samp not_dialog_active -1
  4@ == TRUE
else_jump @Main_02
0AC8: 1@ = allocate_memory_size 256
0AC8: 3@ = allocate_memory_size 260

for 0@ = 98 to 99

    0B75: samp get_chat_string 0@ text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@

    if
        0C29: $NOT_USED = stristr string1 1@ string2 "true"
    then
        wait 0
        jump @Timer_start
        return
    end

end
jump @Main_02


:Timer_start
TIMERA = 0

:Timer
wait 0


0AC8: 10@ = allocate_memory_size 260
0AB1: call @getChatEntryText 1 id 99 to 10@
if
0AD4: $NOT_USED = 10@ format "false"
then
wait 0
    jump @Main_02
end


008A: 0@ = TIMERA
0@ /= 1000

0006: 1@ = 0@
1@ /= 60

0006: 2@ = 1@
2@ *= 60

0006: 3@ = 0@
0A8F: 3@ = 0@ - 2@


03F0: enable_text_draw 1

if
    3@ < 10
then
    0AF2: 30@ = get_float_from_ini_file "cleo\ini\test.ini"  section  "Config" key "x3"
    0AF2: 31@ = get_float_from_ini_file "cleo\ini\test.ini"  section  "Config" key "y3"
    0AF0: 27@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "R3"
    0AF0: 26@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "G3"
    0AF0: 25@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "B3"
    0AF0: 21@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "FUENTE"
    0340: set_text_draw_RGBA 27@ 26@ 25@ 255
    03E4: set_text_draw_align_right 1
    081C: draw_text_outline 1 RGBA 0 0 0 255
    0349: set_text_draw_font 21@
    045B: draw_text_2number 30@ 31@ GXT 'TIME_0' numbers 1@ 3@
else
    0AF2: 30@ = get_float_from_ini_file "cleo\ini\test.ini"  section  "Config" key "x3"
    0AF2: 31@ = get_float_from_ini_file "cleo\ini\test.ini"  section  "Config" key "y3"
    0AF0: 27@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "R3"
    0AF0: 26@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "G3"
    0AF0: 25@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "B3"
    0AF0: 21@ = get_int_from_ini_file "cleo\ini\test.ini"  section  "Config" key "FUENTE"
    0340: set_text_draw_RGBA 27@ 26@ 25@ 255
    03E4: set_text_draw_align_right 1
    081C: draw_text_outline 1 RGBA 0 0 0 255
    0349: set_text_draw_font 21@
    045B: draw_text_2number 30@ 31@ GXT 'TIME' numbers 1@ 3@
end

if
    TIMERA > 34444
else_jump @Timer
jump @Main_02
 
Status
Not open for further replies.
Top