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

jenekbueno

Известный
157
69
Ребята, объясните мне пожалуйста. что в этом коде написано? Подробно
Код:
while true
wait 0
    if
    0@ == 1
    then
        03CB: set_rendering_origin_at 1@ 2@ 3@
        04E4: refresh_game_renderer_at 1@ 2@
        02CE: 8@ = ground_z_at 1@ 2@ 999.0
        8@ += 30.0
        0AE2: 4@ = random_vehicle_near_point 5@ 6@ 7@ in_radius 15.0 find_next 0 pass_wrecked 1 // add to mission cleanup
        00AB: put_car 4@ at 1@ 2@ -80.0
        wait 100
        0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 8@
        Actor.PutAt($PLAYER_ACTOR,1@,2@,-999.0)
        wait 0
        02CE: 8@ = ground_z_at 1@ 2@ 999.0
        Actor.PutAt($PLAYER_ACTOR,1@,2@,8@)
    end
opcodes - list | BlastHack — DEV_WIKI(https://blast.hk/wiki/opcodes:list)
CLEO-справочник(http://gtascript.ru/opcodes/)
 
У

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

Гость
И типо где редактировать задержку?
 
  • Нравится
Реакции: jenekbueno

LaRossa

Потрачен
429
117
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Почему у меня цвета не меняются, а сменяется на 1 цвет и следующие изменения не происходят?

CLEO:
{$CLEO   .cs}
0000:

:av
wait 0
0AFA:  is_samp_available
jf @av
0B34: samp register_client_command "cheatallRGB" to_label @1
0B34: samp register_client_command "cheatallRGBOFF" to_label @2
0BDE: pause_thread 0


:1
wait 0
if
00DF:   actor $PLAYER_ACTOR driving
jf @1
0811: 0@ = actor $PLAYER_ACTOR used_car
0229: set_car 0@ primary_color_to 1 secondary_color_to 211
wait 2000
0229: set_car 0@ primary_color_to 2 secondary_color_to 1
wait 1000
0229: set_car 0@ primary_color_to 3 secondary_color_to 2
wait 2000
0229: set_car 0@ primary_color_to 4 secondary_color_to 3
wait 1000
0229: set_car 0@ primary_color_to 5 secondary_color_to 4
wait 3000
0229: set_car 0@ primary_color_to 6 secondary_color_to 5
0B43: samp cmd_ret


:2
wait 0
0229: set_car 0@ primary_color_to 1 secondary_color_to 211
0B43: samp cmd_ret
CLEO:
{$CLEO}
0000:
while not Samp.Available()
    wait 0
end
0B34: samp register_client_command "cheatallRGB" to_label @cmd

while true
    wait 0
    if and
    0@ == 1
    00DF: actor $PLAYER_ACTOR driving
        then
        0811: 1@ = actor $PLAYER_ACTOR used_car
        0229: set_car 1@ primary_color_to 1 secondary_color_to 211
        wait 2000
        0229: set_car 1@ primary_color_to 2 secondary_color_to 1
        wait 1000
        0229: set_car 1@ primary_color_to 3 secondary_color_to 2
        wait 2000
        0229: set_car 1@ primary_color_to 4 secondary_color_to 3
        wait 1000
        0229: set_car 1@ primary_color_to 5 secondary_color_to 4
        wait 3000
        0229: set_car 1@ primary_color_to 6 secondary_color_to 5
    end
end

:cmd
0B12: 0@ = 0@ XOR 1
if 0@ == 1
    then
    msg "ON" -1
else
    msg "OFF" -1
end
Samp.CmdRet()
 

Lord

Новичок
236
42
Возможно ли подобное?
Вводишь команду, а затем выполняется одно рандомное действие из нескольких указанных. Тип не if or, а then or.
 

LaRossa

Потрачен
429
117
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Возможно ли подобное?
Вводишь команду, а затем выполняется одно рандомное действие из нескольких указанных. Тип не if or, а then or.
CLEO:
{$CLEO}
0000:
while not Samp.Available()
    wait 0
end
cmd "rand" @cmd
0BDE: pause_thread 0

:cmd
0099: 0@ = random_int_in_ranges 0 5

if 0@ == 1
    then
    msg "1" -1
end

if 0@ == 2
    then
    msg "2" -1
end

if 0@ == 3
    then
    msg "3" -1
end

if 0@ == 4
    then
    msg "4" -1
end

if 0@ == 5
    then
    msg "5" -1
end
Samp.CmdRet()
 
  • Нравится
Реакции: Lord
У

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

Гость
Не работает, 1 цвет меняет и все.
 

MArkoas_Gonzaleees

Новичок
22
0
Ребят, помогите с кодом. Хочу сделать личку с возвратом. Типа пишешь /mats тебя ТПхает на военку, ждёт 1 секунду, ТПхает обратно. Но у меня при входе в игру, игра зависает или крашится. Что делать?
Код:
{$CLEO .cs}
0000: NOP

repeat
wait 100
until Samp.Available()

0B34: samp register_client_command "mats" to_label @label1

:label1
wait 100
if and
044B:   actor $PLAYER_ACTOR on_foot
056D:   actor $PLAYER_ACTOR defined
jf @label1
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 1.0
wait 1000
Actor.PutAt($PLAYER_ACTOR, 153.80, 1845.53, 17.64)
wait 1000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
Samp.CmdRet()
 

DarkL1ght

Новичок
252
112
Ребят, помогите с кодом. Хочу сделать личку с возвратом. Типа пишешь /mats тебя ТПхает на военку, ждёт 1 секунду, ТПхает обратно. Но у меня при входе в игру, игра зависает или крашится. Что делать?
Код:
{$CLEO .cs}
0000: NOP

repeat
wait 100
until Samp.Available()

0B34: samp register_client_command "mats" to_label @label1

:label1
wait 100
if and
044B:   actor $PLAYER_ACTOR on_foot
056D:   actor $PLAYER_ACTOR defined
jf @label1
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 1.0
wait 1000
Actor.PutAt($PLAYER_ACTOR, 153.80, 1845.53, 17.64)
wait 1000
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
Samp.CmdRet()
CLEO:
{$CLEO .cs}
0000: NOP

repeat
    wait 0
until Samp.Available()

0B34: samp register_client_command "mats" to_label @mats

repeat
wait 0
    if 0@ == 1
            then
            if 044B:   actor $PLAYER_ACTOR on_foot
            then
            if 056D:   actor $PLAYER_ACTOR defined
            then
            00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
            wait 1000
            04C4: store_coords_to 3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 1.0
            wait 1000
            Actor.PutAt($PLAYER_ACTOR, 153.80, 1845.53, 17.64)
            wait 1000
            00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
            end
        end
    0@ = 0
end
until false

:mats
0@ = 1
0B43: samp cmd_ret
 

Вложения

  • mats.cs
    18.1 KB · Просмотры: 3
У

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

Гость
Почему меня крашит при вводе команды?

CLEO:
{$CLEO  .cs}
0000:

:AV
wait 0
0AFA:  is_samp_available
jf @AV
0B34: samp register_client_command "rgb" to_label @1

0BDE: pause_thread 0


:1
wait 0
if
00DF:   actor $PLAYER_ACTOR driving
jf @error
0811: 0@ = actor $PLAYER_ACTOR used_car
0AD4: 2@ = scan_string 1@ format "%d" 3@
0229: set_car 0@ primary_color_to 1@ secondary_color_to 3@
0B43: samp cmd_ret


:Error
wait 0
0AF8: samp add_message_to_chat "[RGB]Ñÿäüòå â ìàøèíóþ" color 0xFF0000
0B43: samp cmd_ret
 
1,417
1,030
Почему меня крашит при вводе команды?

CLEO:
{$CLEO  .cs}
0000:

:AV
wait 0
0AFA:  is_samp_available
jf @AV
0B34: samp register_client_command "rgb" to_label @1

0BDE: pause_thread 0


:1
wait 0
if
00DF:   actor $PLAYER_ACTOR driving
jf @error
0811: 0@ = actor $PLAYER_ACTOR used_car
0AD4: 2@ = scan_string 1@ format "%d" 3@
0229: set_car 0@ primary_color_to 1@ secondary_color_to 3@
0B43: samp cmd_ret


:Error
wait 0
0AF8: samp add_message_to_chat "[RGB]Ñÿäüòå â ìàøèíóþ" color 0xFF0000
0B43: samp cmd_ret
CLEO:
{$CLEO}
0000:
repeat
wait 0
until 0AFA:

0B34: samp register_client_command "rgb" to_label @1
0BDE: pause_thread 0

:1
0B35: samp 1@ = get_last_command_params
if 00DF:   actor $PLAYER_ACTOR driving
then
    if 0AD4: 2@ = scan_string 1@ format "%d" 3@
    then
        03C0: 0@ = actor $PLAYER_ACTOR car
        0229: set_car 0@ primary_color_to 3@ secondary_color_to 3@
    else
        0AF8: samp add_message_to_chat "[RGB] Введите цвет." color 0xFF0000   
    end
else
    0AF8: samp add_message_to_chat "[RGB] Сядьте в машиную." color 0xFF0000
end
0B43: samp cmd_ret
 

D3.Pheonix

🎹
Модератор
2,837
1,616
как сделать так, чтоб серверная анимка не сбивала as опкоды?
CLEO:
repeat
wait 0
until SAMP.Available()
0BE3: raknet setup_incoming_rpc_hook @anim
0BDE: pause_thread 0

:anim
0BE5: raknet 0@ = get_hook_param 1
if 0@ == 86 // RPC_SCRAPPLYANIMATION
then
0BE0: raknet hook_ret 0 // отклоняет все серверные анимки
end
0BE0: raknet hook_ret 1
А дальше под себя ебашь
 
  • Нравится
Реакции: grandpafromghetto