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

AWRage

Активный
642
141
Как сервер узнает что я АФК? От меня идёт исходящий RPC?
 

unInstance

Новичок
Проверенный
311
222
Нет курсора(((
CLEO:
{$CLEO .cs}
{$NOSOURCE}
0000: NOP

const
    EVENT_BUTTON_CLICKED  = 257
end

thread "rate"

repeat
    wait 400
until SAMP.Available()
0B5A: get_screen_resolution 1@ 2@
1@ /= 2
2@ /= 2

//-----
0B80: dialog 0@ = create "settings"
0B84: dialog 0@ set_pos_XY 1@ 2@ size 224 300

Dialog.AddButton(0@, 1, "Close", 112, 100, 80, 30)
Dialog.SetVisible(0@, 0)

0B34: samp register_client_command "rate" to_label @settings
                                                                                  
while true
    wait 0
    if 31@ == 1
    then
        0B81: dialog 0@ pop_event_to 3@ control_id_to 4@
       
        if 3@ == EVENT_BUTTON_CLICKED
        then
            Dialog.SetVisible(0@, 0)
            0B5D: samp toggle_cursor 0
            31@ = 0
        end
       
    end
end
:settings
Dialog.SetVisible(0@, 1)
0B5D: samp toggle_cursor 1
31@ = 1
cmdret
 

unInstance

Новичок
Проверенный
311
222
{$I SF}
0B8D: samp set_cursor_mode CMODE_LOCKCAMANDCONTROL
Нет.
CLEO:
{$CLEO .cs}
{$NOSOURCE}
0000: NOP

const
    CMODE_DISABLED           = 0
    CMODE_LOCKCAMANDCONTROL  = 2
   
    EVENT_BUTTON_CLICKED     = 257
end

thread "rate"

repeat
    wait 400
until SAMP.Available()
0B5A: get_screen_resolution 1@ 2@
1@ /= 2
2@ /= 2

//-----
0B80: dialog 0@ = create "settings"
0B84: dialog 0@ set_pos_XY 1@ 2@ size 224 300

Dialog.AddButton(0@, 1, "Close", 112, 100, 80, 30)
Dialog.SetVisible(0@, 0)

0B34: samp register_client_command "rate" to_label @settings
                                                                                  
while true
    wait 0
    if 31@ == 1
    then
        0B81: dialog 0@ pop_event_to 3@ control_id_to 4@
       
        if 3@ == EVENT_BUTTON_CLICKED
        then
            Dialog.SetVisible(0@, 0)
           
            0B5D: samp toggle_cursor 0
            0B8D: samp set_cursor_mode CMODE_DISABLED 
            31@ = 0
        end
       
    end
end
:settings
Dialog.SetVisible(0@, 1)

0B5D: samp toggle_cursor 1
0B8D: samp set_cursor_mode CMODE_LOCKCAMANDCONTROL

31@ = 1
cmdret
 

unInstance

Новичок
Проверенный
311
222
CLEO:
{$CLEO .cs}
{$NOSOURCE}
0000: NOP

const
    CMODE_DISABLED           = 0
    CMODE_LOCKCAMANDCONTROL  = 2
   
    EVENT_BUTTON_CLICKED     = 257
end

thread "rate"

repeat
    wait 400
until SAMP.Available()
0B5A: get_screen_resolution 1@ 2@
1@ /= 2
2@ /= 2

//-----
0B80: dialog 0@ = create "settings"
0B84: dialog 0@ set_pos_XY 1@ 2@ size 224 300

Dialog.AddButton(0@, 1, "Close", 112, 100, 80, 30)
Dialog.SetVisible(0@, 0)

0B34: samp register_client_command "rate" to_label @settings
                                                                                  
while true
    wait 0
    if 31@ == 1
    then
        0B81: dialog 0@ pop_event_to 3@ control_id_to 4@
       
        if 3@ == EVENT_BUTTON_CLICKED
        then
            Dialog.SetVisible(0@, 0)
           
            0B5D: samp toggle_cursor 0
            0B8D: samp set_cursor_mode CMODE_DISABLED 
            31@ = 0
        end
       
    end
end
:settings
Dialog.SetVisible(0@, 1)

0B5D: samp toggle_cursor 1
0B8D: samp set_cursor_mode CMODE_LOCKCAMANDCONTROL

31@ = 1
cmdret
CLEO:
{$CLEO .cs}
{$NOSOURCE}
0000: NOP

while true
    wait 0
   
    if key_down 49
    then
        0B5D: samp toggle_cursor 1
        wait 100
    end
   
end
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,696
1,460
Потому что при закрытии чата курсор отключается.
 
  • Нравится
Реакции: unInstance

unInstance

Новичок
Проверенный
311
222
Потому что при закрытии чата курсор отключается.
Збс. Понял.
CLEO:
{$CLEO .cs}
{$NOSOURCE}
0000: NOP

const
    CMODE_DISABLED           = 0
    CMODE_LOCKCAMANDCONTROL  = 2
   
    EVENT_BUTTON_CLICKED     = 257
end

thread "rate"

repeat
    wait 400
until SAMP.Available()
0B5A: get_screen_resolution 1@ 2@
1@ /= 2
2@ /= 2

//-----
0B80: dialog 0@ = create "settings"
0B84: dialog 0@ set_pos_XY 1@ 2@ size 224 300

Dialog.AddButton(0@, 1, "Close", 112, 100, 80, 30)
Dialog.SetVisible(0@, 0)

0B34: samp register_client_command "rate" to_label @settings
                                                                                  
while true
    wait 0
    if 31@ == 1
    then       
        0B5D: samp toggle_cursor 1
        0B81: dialog 0@ pop_event_to 3@ control_id_to 4@
       
        if 3@ == EVENT_BUTTON_CLICKED
        then
            Dialog.SetVisible(0@, 0)
            0B5D: samp toggle_cursor 0             
           
            31@ = 0
        end
       
    end
end
:settings
Dialog.SetVisible(0@, 1)
31@ = 1
cmdret
 
Последнее редактирование:

AWRage

Активный
642
141
Как перевести матрицу углов поворота в сами углы поворота?
 

unInstance

Новичок
Проверенный
311
222
Как можно узнать координаты расположения радара на экране?