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

grandpafromghetto

НАСТАЯЩИЙ ДАГИСТАНИЦ
Проверенный
335
119
CLEO:
// 1 - Замени в функции на этот опкод
0811: 22@ = actor $PLAYER_ACTOR used_car

// 2 - Вызов функции сделай таким
call @drive_to 2 -1036.9877 -589.9189

+ Перепиши конструкцию. Ты не сможешь вырубить бота пока он не доедет
спасибо нахой блять я ебал, тут никто с этим не выебался кроме тебя
 

D3.Pheonix

🎹
Модератор
2,817
1,597
спасибо нахой блять я ебал, тут никто с этим не выебался кроме тебя
Почему тебя крашило написал(а):
GTAG :: OpcodeDB - Opcode 00D9(https://gtagmodding.com/opcode-database/opcode/00D9/)
This opcode also works in normal scripts, however a lot of code is based on missions, so it is better to use 03C0 or 0811 depending on the situation..
 
  • Нравится
Реакции: grandpafromghetto
У

Удалённый пользователь 126082

Гость
Ты не думаешь что пишешь, а просто вставляешь код в SB и надеешься, что методом тыка у тебя что то получится. Так не делается.
Потому что я не понимаю, что сделать надо и что не так

Если все правильно понял... Будут проблемы - пиши
CLEO:
{$CLEO}
0000:
while not Samp.Available()
    wait 0
end
0B34: samp register_client_command "gosms" to_label @cmd
0B34: samp register_client_command "setsms" to_label @setsms

while true
    wait 0
    if and
    30@ == 1
    31@ == 1
        then
        wait 1000
        say "/sms 1  %d" 1@     
    end
end

:cmd
0B12: 30@ = 30@ XOR 1
if 30@ == 1
    then
    0ACD: show_text_highpriority "~y~[SMS] ~g~Started" time 1000
else
    0ACD: show_text_highpriority "~y~[SMS] ~r~Stop" time 1000
end
Samp.CmdRet()

:setsms
0B35: samp 0@ = get_last_command_params
if 0AD4: 0@ = scan_string 0@ format "%d" 1@
    then
    0ACD: show_text_highpriority "~y~[SMS] ~g~Good" time 1000
    31@ = 1
    else
    0ACD: show_text_highpriority "~y~[SMS] ~r~Error" time 1000
    31@ = 0
end
Samp.CmdRet()


Я хотел сделать, чтобы сообщение рассылалось всем игрокам по очереди или хотя бы 1 айди, а затем 2
 
Последнее редактирование модератором:
У

Удалённый пользователь 126082

Гость
Почему гта крашит? Я пробую на высокоуровневых конструкциях.
CLEO:
{$CLEO .cs}
0000:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
       0ADC:   test_cheat "Z"
    Then
        0811: 1@ = actor $PLAYER_ACTOR used_car
          0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
       00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
End
 
1,417
1,029
Почему гта крашит? Я пробую на высокоуровневых конструкциях.
CLEO:
{$CLEO .cs}
0000:

repeat
wait 0
until 0AFA:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
       0ADC:   test_cheat "Z"
    Then
        0811: 1@ = actor $PLAYER_ACTOR used_car
          0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
       00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
End         
end
end забыл и проверку на загруженность сампа, на всякий случай.
 

grandpafromghetto

НАСТАЯЩИЙ ДАГИСТАНИЦ
Проверенный
335
119
Почему гта крашит? Я пробую на высокоуровневых конструкциях.
CLEO:
{$CLEO .cs}
0000:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
       0ADC:   test_cheat "Z"
    Then
        0811: 1@ = actor $PLAYER_ACTOR used_car
          0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
            00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
End
END // ОШИБКА
закрой саму конструкцию
 
У

Удалённый пользователь 126082

Гость
Не крашит, но не робит ;c
CLEO:
{$CLEO .cs}
0000:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
        0ADC:   test_cheat "Z"
            Then
            0811: 1@ = actor $PLAYER_ACTOR used_car
            0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
        00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
   End          
End
 
Последнее редактирование модератором:

DarkL1ght

Новичок
252
112
Не робит ;c
CLEO:
{$CLEO .cs}
0000:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
        0ADC:   test_cheat "Z"
            Then
            0811: 1@ = actor $PLAYER_ACTOR used_car
            0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
        00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
   End          
End
Поставить проверку на самп нужно по идее
 

DarkL1ght

Новичок
252
112
Не крашит, но не робит ;c
CLEO:
{$CLEO .cs}
0000:

While True
wait 0
if and
       00DF:   actor $PLAYER_ACTOR driving
        0ADC:   test_cheat "Z"
            Then
            0811: 1@ = actor $PLAYER_ACTOR used_car
            0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
        00AB: put_car 1@ at 2@ 3@ 4@
    0ACD: show_text_highpriority "~g~Jump" time 1000
   End         
End
CLEO:
{$CLEO .cs}
0000: NOP

while not Samp.Available()
    wait 0
end

WHILE TRUE
wait 0
    IF AND
        Actor.Driving($PLAYER_ACTOR)
        0ADC:   test_cheat "Z"
            THEN
            0811: 1@ = actor $PLAYER_ACTOR used_car
            0407: store_coords_to 2@ 3@ 4@ from_car 1@ with_offset 0.0 0.0 5.0
            00AB: put_car 1@ at 2@ 3@ 4@
        0ACD: show_text_highpriority "~g~Jump" time 1000
    END
END
 

Вложения

  • Z.cs
    17.7 KB · Просмотры: 4
У

Удалённый пользователь 126082

Гость
Почему крашит?
CLEO:
{$CLEO  .cs}
0000:

while not Samp.Available()
    wait 0
end


While True
    IF
       00DF:   actor $PLAYER_ACTOR driving
        Then
        0811: 1@ = actor $PLAYER_ACTOR used_car
        0407: store_coords_to 3@ 4@ 5@ from_car 0@ with_offset 0.0 3.0 3.0
    0AB1: call_scm_func @Save 4 car_handle 0@ XYZ   3@ 4@ 5@

End

:Save
0A97: 25@ = car 0@ struct
    0C0C: 26@ = struct 25@ offset 0x14 size 4
            0C0D: struct 26@ offset 0x30 size 4 = 1@ // X
            0C0D: struct 26@ offset 0x34 size 4 = 2@ // Y
        0C0D: struct 26@ offset 0x38 size 4 = 3@ // Z
    0AB2: ret 0
End
 

grandpafromghetto

НАСТАЯЩИЙ ДАГИСТАНИЦ
Проверенный
335
119
подскажите как записать маршрут на каре, и чтоб сразу можно было нормально его прочитать без всяких расшифровок
 

D3.Pheonix

🎹
Модератор
2,817
1,597
Почему крашит?
CLEO:
{$CLEO  .cs}
0000:

while not Samp.Available()
    wait 0
end


While True
    IF
       00DF:   actor $PLAYER_ACTOR driving
        Then
        0811: 1@ = actor $PLAYER_ACTOR used_car
        0407: store_coords_to 3@ 4@ 5@ from_car 0@ with_offset 0.0 3.0 3.0
    0AB1: call_scm_func @Save 4 car_handle 0@ XYZ   3@ 4@ 5@

End

:Save
0A97: 25@ = car 0@ struct
    0C0C: 26@ = struct 25@ offset 0x14 size 4
            0C0D: struct 26@ offset 0x30 size 4 = 1@ // X
            0C0D: struct 26@ offset 0x34 size 4 = 2@ // Y
        0C0D: struct 26@ offset 0x38 size 4 = 3@ // Z
    0AB2: ret 0
End
я тебе уже говорил: пиздуй гайды/уроки по Cleo читать или смотреть
 

vegasjeny

Новичок
4
0
в чем проблема?) скрипт не сканирует строчку

CLEO:
{$CLEO}
0000:

repeat
    wait 300
until samp.Available()
0B34: samp register_client_command "ggg" to_label @cmd
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
while true
 wait 0
 if 0@ == true
    then
     0AF9: samp say_msg "/de 1"
     13@ = 500
     0B75: samp get_chat_string 99 text_to 1@ prefix_to 2@ color_to 3@ prefix_color_to 4@
     if
       0C18: 3@ = strstr string1 1@ string2 "Осталось:"
        then
         0AD4: 5@ = scan_string 1@ format "Осталось: %d материалов" 10@ 
         0062: 13@ -= 10@
         0AF9: samp say_msg "/get guns %d" 13@
         else
          0AF9: samp say_msg "/get guns 500"
          0@ = 0
          free 1@
        end
    end
end
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////     
:cmd
0B12: 0@ = 0@ XOR 1
if 0@ == true
then
alloc 1@ 128
else
free 1@
end
SAMP.CmdRet()