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

Lineage

Новичок
4
0
Код:
{$VERSION 3.1.0027} 
{$CLEO .cs} 
           
0662: NOP "CLEO Kill Death" 
thread "kide" 
           
if 
          8AF7: get_samp_base_to 33@ 
then 
          0A93: end_custom_thread 
end 
repeat 
          wait 400 
until 0AFA: is_samp_structures_available 
           
wait 0 
1@ = 0 
2@ = 0 
0AF8: samp add_message_to_chat "[KIDE]: Ââåäèòå '/kide', ÷òîáû óâèäåòü ñòàòèñòèêó óáèéñòâ/ñìåðòåé." 16750899 
0B34: samp register_client_command "kide" to_label @dead 
           
:dead 
wait 0 
if 
Actor.Dead($PLAYER_ACTOR) 
else_jump @dead3 
1@ += 1 
:dead2 
wait 0 
if 
not Actor.Dead($PLAYER_ACTOR) 
else_jump @dead2 
jump @dead 
:dead3 
wait 0 
if 
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET 
else_jump @dead 
if 
        Actor.Dead(0@) 
else_jump @dead 
2@ += 1 
:dead4 
wait 0 
if 
0AB0: not key_pressed 2 
else_jump @dead5 
wait 1500 
jump @dead 
:dead5 
wait 0 
if 
Actor.Dead($PLAYER_ACTOR) 
else_jump @dead4 
1@ += 1 
jump @dead2 
           
:kide 
wait 0 
0AF8: samp add_message_to_chat "[KIDE]: Âû óáèëè %d ÷åëîâåê(à) è óìåðëè %d ðàç(à) çà ñåññèþ." 16750899 2@ 1@ 
0B43: samp cmd_ret

Пишет:
Код:
Неизвестный опкод 0B34

Как исправить?
 

SR_team

like pancake
BH Team
4,791
6,466
Код:
{$VERSION 3.1.0027}
{$CLEO .cs}
         
0662: NOP "CLEO Kill Death"
thread "kide"
         
if
          8AF7: get_samp_base_to 33@
then
          0A93: end_custom_thread
end
repeat
          wait 400
until 0AFA: is_samp_structures_available
         
wait 0
1@ = 0
2@ = 0
0AF8: samp add_message_to_chat "[KIDE]: Ââåäèòå '/kide', ÷òîáû óâèäåòü ñòàòèñòèêó óáèéñòâ/ñìåðòåé." 16750899
0B34: samp register_client_command "kide" to_label @dead
         
:dead
wait 0
if
Actor.Dead($PLAYER_ACTOR)
else_jump @dead3
1@ += 1
:dead2
wait 0
if
not Actor.Dead($PLAYER_ACTOR)
else_jump @dead2
jump @dead
:dead3
wait 0
if
0AD2: 0@ = player $PLAYER_CHAR targeted_actor //IF and SET
else_jump @dead
if
        Actor.Dead(0@)
else_jump @dead
2@ += 1
:dead4
wait 0
if
0AB0: not key_pressed 2
else_jump @dead5
wait 1500
jump @dead
:dead5
wait 0
if
Actor.Dead($PLAYER_ACTOR)
else_jump @dead4
1@ += 1
jump @dead2
         
:kide
wait 0
0AF8: samp add_message_to_chat "[KIDE]: Âû óáèëè %d ÷åëîâåê(à) è óìåðëè %d ðàç(à) çà ñåññèþ." 16750899 2@ 1@
0B43: samp cmd_ret

Пишет:
Код:
Неизвестный опкод 0B34

Как исправить?

добавь опкод в opcodes.txt и sasacm.ini
 
  • Нравится
Реакции: Lineage

querta

Известный
Проверенный
346
42
есть клео неотцепляющийся прицеп. как сделать, например, чтобы он активировался по команде /pricep ?

Код:
// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
 
//-------------MAIN---------------
0000: NOP
 
:NONAME_2
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @NONAME_373
if and
  Actor.Driving($PLAYER_ACTOR)
  $ONMISSION == 0
else_jump @NONAME_373
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0A97: 1@ = car 0@ struct
1@ += 1224
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
  1@ > 0
else_jump @NONAME_373
0AEB: 1@ = car_struct 1@ handle
 
:NONAME_107
056E:  car 0@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(0@)
else_jump @NONAME_373
if
  Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @NONAME_373
if
  $ONMISSION == 0
else_jump @NONAME_373
if
056E:  car 1@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(1@)
else_jump @NONAME_373
if
00E1:  player 0 pressed_key 10
else_jump @NONAME_236
07AC: detach_trailer 1@ from_cab 0@
jump @NONAME_373
 
:NONAME_236
if
87AB:  not car 1@ has_attached_trailer 0@
else_jump @NONAME_362
0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 0.0 0.0
0407: store_coords_to 5@ 6@ 7@ from_car 0@ with_offset 0.0 -15.0 0.0
if
06BD:  no_obstacles_between 2@ 3@ 4@ and 5@ 6@ 7@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @NONAME_362
0893: put_trailer 1@ on_cab 0@
 
:NONAME_362
wait 0
jump @NONAME_107
 
:NONAME_373
jump @NONAME_2
0662: printstring "ÑÊÐÈÏÒ *ÔÈÊÑÈÐÎÂÀÍÍÛÉ ÏÐÈÖÅÏ*. ÀÂÒÎÐ: KENKING 2011"
 

legioner1234

Новичок
32
0
как сделать отправку ложних координат серверу сидя в машине ?
такой должен быть код ? и подскажите как поставить задержку между отправкой координат ?

PHP:
{$CLEO .cs}
{$Include includes\RakNetDefines.txt}
0000:
 
if 0@ = SAMP.Base()
then
while not SAMP.Available()
wait 500
end
else
end_thread
end
 
while true
wait 0
if Actor.Defined($player_actor) // Проверка существует ли игрок
then
if
0ab0: 52 // Клавиша 4, не Num
then
wait 300 // Задержка в 300 мс.
if
Actor.Driving($player_actor) // Тут идет проверка на то чтобы игрок находился в автомобиле.
then
0ab1: @send_position 3 324.5789 1952.1339 17.6406 // Здесь идет отправка функции с координатами на метку "send_position". Тут указываем нужные вам координаты, то есть координаты "324.5789" - по оси X | "1952.1339" - по оси Y | "17.6406" - по оси Z.
end
end
end
end
 
const
sizeof_stInCarData = 63
end
 
:send_position
 
// Тут идет сама функция.
0B2B: samp 3@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0B24: samp 3@ = get_player_ptr 3@
3@ += 177
0AC8: 4@ = allocate_memory_size 63
0C10: memcpy destination 4@ source 3@ size 63
0C0D: struct 4@ offset 24 size 4 = 0@
0C0D: struct 4@ offset 28 size 4 = 1@
0C0D: struct 4@ offset 32 size 4 = 2@
0B3D: raknet 5@ = new_bit_stream
0B40: raknet bit_stream 5@ write PACKET_VEHICLE_SYNC type BS_TYPE_BYTE size 1
0B40: raknet bit_stream 5@ write 4@ type BS_TYPE_ARRAY size 63
0B42: raknet send bit_stream 5@ priority PRIORITY_HIGH reliability UNRELIABLE_SEQUENCED ordering_channel 0
0B3E: raknet delete_bit_stream 5@
0AC9: free_allocated_memory 4@
0AB2: 0
 

SR_team

like pancake
BH Team
4,791
6,466
есть клео неотцепляющийся прицеп. как сделать, например, чтобы он активировался по команде /pricep ?

Код:
// This file was decompiled using SASCM.INI published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
 
//-------------MAIN---------------
0000: NOP
 
:NONAME_2
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @NONAME_373
if and
  Actor.Driving($PLAYER_ACTOR)
  $ONMISSION == 0
else_jump @NONAME_373
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0A97: 1@ = car 0@ struct
1@ += 1224
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
  1@ > 0
else_jump @NONAME_373
0AEB: 1@ = car_struct 1@ handle
 
:NONAME_107
056E:  car 0@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(0@)
else_jump @NONAME_373
if
  Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @NONAME_373
if
  $ONMISSION == 0
else_jump @NONAME_373
if
056E:  car 1@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(1@)
else_jump @NONAME_373
if
00E1:  player 0 pressed_key 10
else_jump @NONAME_236
07AC: detach_trailer 1@ from_cab 0@
jump @NONAME_373
 
:NONAME_236
if
87AB:  not car 1@ has_attached_trailer 0@
else_jump @NONAME_362
0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 0.0 0.0
0407: store_coords_to 5@ 6@ 7@ from_car 0@ with_offset 0.0 -15.0 0.0
if
06BD:  no_obstacles_between 2@ 3@ 4@ and 5@ 6@ 7@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @NONAME_362
0893: put_trailer 1@ on_cab 0@
 
:NONAME_362
wait 0
jump @NONAME_107
 
:NONAME_373
jump @NONAME_2
0662: printstring "ÑÊÐÈÏÒ *ÔÈÊÑÈÐÎÂÀÍÍÛÉ ÏÐÈÖÅÏ*. ÀÂÒÎÐ: KENKING 2011"


PHP:
0000: NOP
0006: 21@ = 0   
:0
0001: wait 400 ms
0AFA:    is_samp_load
004D: jump_if_false @0
wait 0         
0B34: samp register_client_command "pricep" to_label @2
 
:1
wait 0
jump @1
 
:2
0001: wait 0 ms
00D6: if
0039:  21@ == 0
004D: jump_if_false @3
0006: 21@ = 1
0AF8: samp msg "ФИКСИРОВАННЫЙ ПРИЦЕП ВКЛЮЧЕН." color 53576
0002: jump @NONAME_2
 
:3
0001: wait 0 ms
0006: 21@ = 0
0AF8: samp msg "ФИКСИРОВАННЫЙ ПРИЦЕП ВЫКЛЮЧЕН." color 53576
0002: jump @1
 
:NONAME_2
wait 0
if and
21@ == 1
  Player.Defined($PLAYER_CHAR)
else_jump @NONAME_373
if and
  Actor.Driving($PLAYER_ACTOR)
  $ONMISSION == 0
else_jump @NONAME_373
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0A97: 1@ = car 0@ struct
1@ += 1224
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
  1@ > 0
else_jump @NONAME_373
0AEB: 1@ = car_struct 1@ handle
 
:NONAME_107
056E:  car 0@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(0@)
else_jump @NONAME_373
if
  Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @NONAME_373
if
  $ONMISSION == 0
else_jump @NONAME_373
if
056E:  car 1@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(1@)
else_jump @NONAME_373
if
00E1:  player 0 pressed_key 10
else_jump @NONAME_236
07AC: detach_trailer 1@ from_cab 0@
jump @NONAME_373
 
:NONAME_236
if
87AB:  not car 1@ has_attached_trailer 0@
else_jump @NONAME_362
0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 0.0 0.0
0407: store_coords_to 5@ 6@ 7@ from_car 0@ with_offset 0.0 -15.0 0.0
if
06BD:  no_obstacles_between 2@ 3@ 4@ and 5@ 6@ 7@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @NONAME_362
0893: put_trailer 1@ on_cab 0@
 
:NONAME_362
wait 0
jump @NONAME_107
 
:NONAME_373
jump @NONAME_2
0662: printstring "СКРИПТ *ФИКСИРОВАННЫЙ ПРИЦЕП*. АВТОР: KENKING 2011"
 

querta

Известный
Проверенный
346
42
PHP:
0000: NOP
0006: 21@ = 0   
:0
0001: wait 400 ms
0AFA:    is_samp_load
004D: jump_if_false @0
wait 0         
0B34: samp register_client_command "pricep" to_label @2
 
:1
wait 0
jump @1
 
:2
0001: wait 0 ms
00D6: if
0039:  21@ == 0
004D: jump_if_false @3
0006: 21@ = 1
0AF8: samp msg "ФИКСИРОВАННЫЙ ПРИЦЕП ВКЛЮЧЕН." color 53576
0002: jump @NONAME_2
 
:3
0001: wait 0 ms
0006: 21@ = 0
0AF8: samp msg "ФИКСИРОВАННЫЙ ПРИЦЕП ВЫКЛЮЧЕН." color 53576
0B43: samp cmd_ret
 
:NONAME_2
wait 0
if and
21@ == 1
  Player.Defined($PLAYER_CHAR)
else_jump @NONAME_373
if and
  Actor.Driving($PLAYER_ACTOR)
  $ONMISSION == 0
else_jump @NONAME_373
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0A97: 1@ = car 0@ struct
1@ += 1224
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
if
  1@ > 0
else_jump @NONAME_373
0AEB: 1@ = car_struct 1@ handle
 
:NONAME_107
056E:  car 0@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(0@)
else_jump @NONAME_373
if
  Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @NONAME_373
if
  $ONMISSION == 0
else_jump @NONAME_373
if
056E:  car 1@ defined
else_jump @NONAME_373
if
  not Car.Wrecked(1@)
else_jump @NONAME_373
if
00E1:  player 0 pressed_key 10
else_jump @NONAME_236
07AC: detach_trailer 1@ from_cab 0@
jump @NONAME_373
 
:NONAME_236
if
87AB:  not car 1@ has_attached_trailer 0@
else_jump @NONAME_362
0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 0.0 0.0
0407: store_coords_to 5@ 6@ 7@ from_car 0@ with_offset 0.0 -15.0 0.0
if
06BD:  no_obstacles_between 2@ 3@ 4@ and 5@ 6@ 7@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @NONAME_362
0893: put_trailer 1@ on_cab 0@
 
:NONAME_362
wait 0
jump @NONAME_107
 
:NONAME_373
jump @NONAME_2
0662: printstring "СКРИПТ *ФИКСИРОВАННЫЙ ПРИЦЕП*. АВТОР: KENKING 2011"

скрипт не выключается
 

TheMonstercat

Известный
75
11
Hey how i can make multiple Keybinds in CLEO? Can someone give me an example pls i think there is a way with "Then end" but im not so experienced with this Scripting Style :/
I would use gosub @ but i think this is to awkward.
 

hnnssy

Известный
Друг
2,684
2,760
Hey how i can make multiple Keybinds in CLEO? Can someone give me an example pls i think there is a way with "Then end" but im not so experienced with this Scripting Style :/
I would use gosub @ but i think this is to awkward.

Если я правильно прочёл твою просьбу, то вот:
Код:
{$CLEO .cs}
Thread "hnnssy"
8AF7:  not get_samp_base_to 29@
:0
wait 400
0AFA:  is_samp_structures_available
jf @1
 
:1
wait 0
if
0ab0: key_pressed 97
jf @2
wait 100
Actor.PutAt($PLAYER_ACTOR, 811.1677, -1098.4496, 25.9063)
jump @1
 
:2
wait 0
if
0ab0: key_pressed 98
jf @3
wait 100
Actor.PutAt($PLAYER_ACTOR, -1968.7371, 139.9143, 27.6875)
jump @2
 
:3
wait 0
if
0ab0: key_pressed 99
jf @4
wait 100
Actor.PutAt($PLAYER_ACTOR, -2116.8198, 220.0604, 35.2458)
jump @3
 
:4
wait 0
if
0ab0: key_pressed 100
jf @5
wait 100
Actor.PutAt($PLAYER_ACTOR, 2179.7383, -1662.3645, 14.8689)
jump @4
 
:5
wait 0
if
0ab0: key_pressed 101
jf @1
wait 100
Actor.PutAt($PLAYER_ACTOR, 323.2512, 1118.3815, 1083.8828)
jump @5
 

Dark_Knight

Me, me and me.
Друг
4,078
2,094
Если я правильно прочёл твою просьбу, то вот:
Код:
{$CLEO .cs}
Thread "hnnssy"
8AF7:  not get_samp_base_to 29@
:0
wait 400
0AFA:  is_samp_structures_available
jf @1
 
:1
wait 0
if
0ab0: key_pressed 97
jf @2
wait 100
Actor.PutAt($PLAYER_ACTOR, 811.1677, -1098.4496, 25.9063)
jump @1
 
:2
wait 0
if
0ab0: key_pressed 98
jf @3
wait 100
Actor.PutAt($PLAYER_ACTOR, -1968.7371, 139.9143, 27.6875)
jump @2
 
:3
wait 0
if
0ab0: key_pressed 99
jf @4
wait 100
Actor.PutAt($PLAYER_ACTOR, -2116.8198, 220.0604, 35.2458)
jump @3
 
:4
wait 0
if
0ab0: key_pressed 100
jf @5
wait 100
Actor.PutAt($PLAYER_ACTOR, 2179.7383, -1662.3645, 14.8689)
jump @4
 
:5
wait 0
if
0ab0: key_pressed 101
jf @1
wait 100
Actor.PutAt($PLAYER_ACTOR, 323.2512, 1118.3815, 1083.8828)
jump @5
У тебяне правильно скрипт зациклирован -_-
 

patrikmister

Новичок
88
7
ребят, первое клео мое. не могу понять, почему из ини файла не берется текст и не вставляется в нужное место. просто на рандоме генерируется то, где должен быть текст, вводимый в ини файл

Код:
{$CLEO .cs}
0000: NOP
wait 5000
 
8AAB: file_exists "CLEO\FAKE.ini"
jf @0
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
:0
wait 400
0AFA: is_samp_load
jf @1
 
:1
wait 0
jf @3
 
:3
0AC8: 0@V = ALLOCATE_MEMORY_size 260
0AC8: 1@v = allocate_memory_size 260
0AF4: 0@v = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF4: 1@v = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
jf @2
 
:2
 
0AF8: samp msg "ла-ла-ла"
0AF8: samp msg "%s..." color 0xFF61BB 0@v
0AF8: samp msg "%s" color 0xFF61BB 1@v
0B43: end_custom_thread
 

Dark_Knight

Me, me and me.
Друг
4,078
2,094
ребят, первое клео мое. не могу понять, почему из ини файла не берется текст и не вставляется в нужное место. просто на рандоме генерируется то, где должен быть текст, вводимый в ини файл

Код:
0AF8: samp msg "ла-ла-ла"

Gde cvet?
 

hnnssy

Известный
Друг
2,684
2,760
ребят, первое клео мое. не могу понять, почему из ини файла не берется текст и не вставляется в нужное место. просто на рандоме генерируется то, где должен быть текст, вводимый в ини файл

Код:
{$CLEO .cs}
0000: NOP
wait 5000
 
8AAB: file_exists "CLEO\FAKE.ini"
jf @0
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
:0
wait 400
0AFA: is_samp_load
jf @1
 
:1
wait 0
jf @3
 
:3
0AC8: 0@V = ALLOCATE_MEMORY_size 260
0AC8: 1@v = allocate_memory_size 260
0AF4: 0@v = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF4: 1@v = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
jf @2
 
:2
 
0AF8: samp msg "ла-ла-ла"
0AF8: samp msg "%s..." color 0xFF61BB 0@v
0AF8: samp msg "%s" color 0xFF61BB 1@v
0B43: end_custom_thread
Код:
0AC8: 0@ = allocate_memory_size 64
0AC8: 1@ = allocate_memory_size 64
if
8AAB: file_exists "CLEO\FAKE.ini"
then
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
else
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "TEXT"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "TEXT_"
end
0AF8: samp msg "ла-ла-ла" color 0xFF61BB
0AF8: samp msg "%s..." color 0xFF61BB 0@
0AF8: samp msg "%s" color 0xFF61BB 1@
0AC9: free_allocated_memory 0@
0AC9: free_allocated_memory 1@
0B43: end_custom_thread
 

Sneyk_Next

Новичок
7
0
wait 60
if 0B23: samp is_player_connected 1@
then
0AFE: samp send_death_by_player 1@ with_reason 24
end
end
0b43:

Прошу помочь, крашит
 

patrikmister

Новичок
88
7
Код:
{$CLEO .cs}
0000: NOP
wait 5000
 
:1
0AC8: 0@ = allocate_memory_size 64
0AC8: 1@ = allocate_memory_size 64
if
8AAB: file_exists "CLEO\FAKE.ini"
then
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
else
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
end
0AF8: samp msg "la-la-la" color 0xFF61BB
0AF8: samp msg "%s..." color 0xFF61BB 0@
0AF8: samp msg "la-la-la" color 0xFF61BB
0AF8: samp msg "%s" color 0xFF61BB 1@
0AC9: free_allocated_memory 0@
0AC9: free_allocated_memory 1@
0B43: end_custom_thread

пак варнингов....