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

PoccoJI

Новичок
135
10
юзани как-нибудь так: 0af8: "%d %c" -1 146 0x35 дарк выше пример приводил
 

TheMonstercat

Известный
75
11
Hey can someone tell me how gcode made this anti Mousklick Spam in gProject

Now im using a Timer to handle it but i need a better way ^^
I hope someone can tell me how he did it :)

Код:
IF AND
    0AB0: 1
    32@ > 200
THEN
    32@ = 0
    IF
    0AB1: CALL @is_cursor_here 4 start 1641 800 end_offset 160 60
    THEN
        IF
        Silentaim == FALSE
        THEN
        0DBA: $Silentaim = new_cleo_thread from_label @Silentaim
        Silentaim = TRUE
        ELSE
        0DBD: exit_thread $Silentaim
        Silentaim = FALSE
        END 
    END
END
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,448
32@ - global timer
When click on button, then the timer is cleared and 2 times click on button is not happening.
After 200ms - click on button is available

my eng. is bad
 

TheMonstercat

Известный
75
11
Yeah i know thats how i made it ^^
But im looking for gcode's way: in gProject if you click the Button and hold the LMB the button only get's klicked once...
With the way i use if i holt LMB the Button get's klicked every 200ms...

my eng. is bad too ^^
 

Opcode.eXe

Известный
84
112
@Monstercat:
You can check if you CLICKED your mouse once with an external thread :P
Just learn from it:
Код:
{$CLEO .cs}
0000:
 
 
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0AB1: @CREATE_THREAD 1 @MOUSE_CLICK_CHECKER
CONST
    MOUSE_CLICK_STATE = 999
END
 
 
 
WHILE TRUE
    WAIT 0
    0AB4: 0@ = MOUSE_CLICK_STATE
    IF
    0@ == TRUE
    THEN
        0AD1: "MOUSE_GOT_CLICKED_ONCE" 1337
    END
END
 
 
 
 
:MOUSE_CLICK_CHECKER
0000: MOUSE_CLICK_BY_OPCODEXE
 
WHILE TRUE
    WAIT 0
    IF
    0AB0: 1
    THEN
        0AB3: MOUSE_CLICK_STATE = TRUE
        REPEAT
            WAIT 0
        UNTIL 8AB0: 1   
        0AB3: MOUSE_CLICK_STATE = FALSE
    END
END
 
  • Нравится
Реакции: XyJluraH_J

TheMonstercat

Известный
75
11
0C5C: samp textdraw 5 get_letter_size 1@ 2@ color 3@
0AF8: samp add_message_to_chat "%d %d %d" color 0xFFFFFFFF 1@ 2@ 3@

Why this wont work?

It returns:
[05:14:15] 1061158895 1074161254 -1