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

01EG

Известный
Проверенный
631
345
Код:
{$CLEO .cs}

0000: NOP \\ Чтоб работал весь скрипт

0001: wait 0 ms \\ время перед созданием дороги

\\ Создаю маркер
03BC: 0@ = create_sphere_at 344.1356 1948.1725 13.0038 radius 2.0 
\\ Создал маркер

\\ Создаю дорогу
Model.Load(2910)
038B: load_requested_models

:create_road
wait 0
if
Model.Available(2910)
jf @create_road
1@ = Object.Create(2910, 301.6642, 1947.0680, 12.0049)
0453: set_object 1@ XY_rotation 0.0 0.0 angle 270.2737
wait 0
Model.Destroy(2910)
\\ Создал дорогу

0001: wait 0 ms \\ Время перед регистрацией команды

\\ Начало создание команды
repeat
wait 0 ms
until 0AFA:  is_samp_available

0B34: samp register_client_command "tproad" to_label @cmdtp

while true
    wait 0
end 
\\ Конец создания команды

\\ Функция команды
:cmdtp
Actor.PutAt($PLAYER_ACTOR, 301.6642, 1947.0680, 12.1201)
\\ Конец функции команды  

\\ Функция маркера
:marker1
wait 0
if
00EC: actor $PLAYER_ACTOR 0 near_point 344.1356 1948.1725 radius 2.0 2.0
jf @cmdtp
Actor.PutAt($PLAYER_ACTOR, 395.4182, 1948.6021, 7.3792)
wait 1500
Actor.PutAt($PLAYER_ACTOR, 461.8143, 1946.3988, 7.3792)
wait 1500
Actor.PutAt($PLAYER_ACTOR, 538.7843, 1942.3604, 0.8302)
wait 1500
Actor.PutAt($PLAYER_ACTOR, 625.1140, 1926.2791, 3.0359)
wait 1500
Actor.PutAt($PLAYER_ACTOR, 705.4528, 1922.1724, 6.6878)
jump @cmdtp
\\ Конец функции маркера

0B43: samp cmd_ret

Когда ввожу /tproad - ГТА зависает, крашится и т.д. Рассписал свой код, чтоб вам было проще его анализировать.
 

Mark91

Новичок
23
2
Код:
{$CLEO .cs}

-snip-

Когда ввожу /tproad - ГТА зависает, крашится и т.д. Рассписал свой код, чтоб вам было проще его анализировать.

That's one ugly fucking mess of a code cave. This is how it is done.


Код:
{$CLEO}


thread "fak"

repeat
wait 0 ms
until SAMP.Available()

0B34: "tproad" @cmdtp

:create_road
wait 0
03BC: 0@ = create_sphere_at 344.1356 1948.1725 13.0038 radius 2.0
Model.Load(2910)
if
    Model.Available(2910)
then
1@ = Object.Create(2910, 301.6642, 1947.0680, 12.0049)
0453: set_object 1@ XY_rotation 0.0 0.0 angle 270.2737
Model.Destroy(2910)
end

:cmdtp
Actor.PutAt($PLAYER_ACTOR, 301.6642, 1947.0680, 12.1201)
SAMP.CmdRet()

while true
wait 0
end

:marker1
wait 0
if
    00EC: actor $PLAYER_ACTOR 0 near_point 344.1356 1948.1725 radius 2.0 2.0
then
    Actor.PutAt($PLAYER_ACTOR, 395.4182, 1948.6021, 7.3792)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 461.8143, 1946.3988, 7.3792)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 538.7843, 1942.3604, 0.8302)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 625.1140, 1926.2791, 3.0359)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 705.4528, 1922.1724, 6.6878)
end
 
  • Нравится
Реакции: 01EG

01EG

Известный
Проверенный
631
345
That's one ugly fucking mess of a code cave. This is how it is done.


Код:
{$CLEO}


thread "fak"

repeat
wait 0 ms
until SAMP.Available()

0B34: "tproad" @cmdtp

:create_road
wait 0
03BC: 0@ = create_sphere_at 344.1356 1948.1725 13.0038 radius 2.0
Model.Load(2910)
if
    Model.Available(2910)
then
1@ = Object.Create(2910, 301.6642, 1947.0680, 12.0049)
0453: set_object 1@ XY_rotation 0.0 0.0 angle 270.2737
Model.Destroy(2910)
end

:cmdtp
Actor.PutAt($PLAYER_ACTOR, 301.6642, 1947.0680, 12.1201)
SAMP.CmdRet()

while true
wait 0
end

:marker1
wait 0
if
    00EC: actor $PLAYER_ACTOR 0 near_point 344.1356 1948.1725 radius 2.0 2.0
then
    Actor.PutAt($PLAYER_ACTOR, 395.4182, 1948.6021, 7.3792)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 461.8143, 1946.3988, 7.3792)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 538.7843, 1942.3604, 0.8302)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 625.1140, 1926.2791, 3.0359)
    wait 1500
    Actor.PutAt($PLAYER_ACTOR, 705.4528, 1922.1724, 6.6878)
end

Thx, but road not create and marker not work.
Спасибо, но дорога не создалась и маркер не работает.
 

spiceman

GOWNIK <3
104
35
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
  • Нравится
Реакции: Griphin_Coder

DarkP1xel

Сила воли наше всё.
BH Team
3,635
4,962
ba965-clip-53kb.png

117d3-clip-67kb.jpg

Тут найдёшь их описание: http://gtag.gtagaming.com/opcode-database/ .
 
  • Нравится
Реакции: Griphin_Coder

BugHunter

Известный
91
12
Как создать диалог в котором можно будет выбирать читы которые включить?
 

Mark91

Новичок
23
2
I'm looking for memory addresses of onfoot data, incar data, aiming data, money data, passenger data, unoccupied data, weapon data, spec data for 0.3.7, please post if you're aware of as many.
 

01EG

Известный
Проверенный
631
345
Код:
{$CLEO}
0000:

repeat
wait 500
0AFA:  is_samp_available
until 0AFA:  is_samp_available

0B34: samp register_client_command "health" to_label @health

while true
wait 0
end

:health
0AC8: 2@ = allocate_memory_size 32
0B20: samp 0@ = actor_handle_by_samp_player_id 8@
0B25: samp 1@ = get_player_health 0@
0AD3: 2@ = format "%s" 1@
0AD1: show_formatted_text_highpriority "%s" time 2000 2@
0AC9: free_allocated_memory 2@
0B43: samp cmd_ret
Я хочу при вводе команды /health id , получить хп другого игрока и вывести их с помощью форматирования на экран. Форматирование я хорошо освоил и с ним проблем не будет, но как мне получать хэндл другого игрока. Сам опкод получения хэндла другого игрока я нашел(0B20: samp 0@ = actor_handle_by_samp_player_id 8@), но я не понимаю как его юзать. Кто может и кому не лень, сделайте пример получения хэндла другого игрока(ида).
 

itsLegend

Фонд борьбы за жуков 🐞
Администратор
2,695
1,448
Код:
:health
0B35: samp 8@ = get_last_command_params
0C1A: 8@ = atoi 8@
if and
    8@ >= 0
    8@ <= 1000
then
    0B25: samp 1@ = get_player_health 8@
    0AD1: show_formatted_text_highpriority "%d" time 2000 1@
 
    //0AC8: 2@ = allocate_memory_size 32
    //0AD3: 2@ = format "%d" 1@
    //0AD1: show_formatted_text_highpriority "%s" time 2000 2@
    //0AC9: free_allocated_memory 2@
end
0B43: samp cmd_ret
 
  • Нравится
Реакции: Xample и 01EG