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

fonarik

Известный
206
3
Код:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
 
{$VERSION 3.1.0027}
{$CLEO .cs}
 
//-------------MAIN---------------
0662: NOP "By camper96"
thread "coordmaster"
if
0@ = SAMP.Base()
jf @coordmaster_48
0A93: end_custom_thread
 
:coordmaster_48
wait 200
  SAMP.Available
jf @coordmaster_48
0B34: samp register_client_command "coord" to_label @coordmaster_87
 
:coordmaster_76
wait 0
jump @coordmaster_76
 
:coordmaster_87
3@ = SAMP.RegisterClientCommand()
if
0AD4: 29@ 3@ format "%f%f%f" 3@ 4@ 5@
jf @coordmaster_1048
wait 10
0AF8: samp add_message_to_chat "Coords save" 3@ 4@ 5@
 
:coordmaster_158
wait 0
if
0ADC:  test_cheat "GO"
jf @coordmaster_1041
wait 10
0AF8: samp add_message_to_chat "CoordsMaster by Camper96 Actived"
 
:coordmaster_220
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
0509: 6@ = distance_between_XY 3@ 4@ and_XY 0@ 1@
050A: 7@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 0@ 1@ 2@
if
  not 7@ > 70.0
jf @coordmaster_332
02CE: 5@ = ground_z_at 3@ 4@ 999.0
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@)
jump @coordmaster_967
 
:coordmaster_332
if and
0025:  2@ > 5@ // (float)
  2@ > 30.0
jf @coordmaster_505
Actor.LockInCurrentPosition($PLAYER_ACTOR) = True
if
  Actor.Driving($PLAYER_ACTOR)
jf @coordmaster_399
30@ = Actor.Car($PLAYER_ACTOR)
Car.LockInCurrentPosition(30@) = False
 
:coordmaster_399
if
  not 2@ >= 30.0
jf @coordmaster_427
jump @coordmaster_505
 
:coordmaster_427
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
050A: 7@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 0@ 1@ 2@
wait 1000
jump @coordmaster_399
 
:coordmaster_505
if and
8025:  not  2@ > 5@ // (float)
  not 6@ >= 70.0
jf @coordmaster_742
Actor.LockInCurrentPosition($PLAYER_ACTOR) = True
if
  Actor.Driving($PLAYER_ACTOR)
jf @coordmaster_572
30@ = Actor.Car($PLAYER_ACTOR)
Car.LockInCurrentPosition(30@) = True
 
:coordmaster_572
  7@ > 70.0
jf @coordmaster_667
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 2@)
050A: 7@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 0@ 1@ 2@
wait 1000
jump @coordmaster_572
 
:coordmaster_667
02CE: 5@ = ground_z_at 3@ 4@ 999.0
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@)
Actor.LockInCurrentPosition($PLAYER_ACTOR) = False
if
  Actor.Driving($PLAYER_ACTOR)
jf @coordmaster_735
30@ = Actor.Car($PLAYER_ACTOR)
Car.LockInCurrentPosition(30@) = False
 
:coordmaster_735
jump @coordmaster_967
 
:coordmaster_742
0063: 3@ -= 0@ // (float)
0063: 4@ -= 1@ // (float)
0604: get_Z_angle_for_point 3@ 4@ store_to 8@
Actor.Angle($PLAYER_ACTOR) = 8@
Actor.LockInCurrentPosition($PLAYER_ACTOR) = True
if
  Actor.Driving($PLAYER_ACTOR)
jf @coordmaster_823
30@ = Actor.Car($PLAYER_ACTOR)
Car.Angle(30@) = 8@
Car.LockInCurrentPosition(30@) = True
 
:coordmaster_823
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0 70.0 0
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, -40.0)
wait 1000
jump @coordmaster_911
02CE: 5@ = ground_z_at 3@ 4@ 999.0
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@)
jump @coordmaster_967
 
:coordmaster_911
0ADC:  test_cheat "NO"
jf @coordmaster_220
wait 10
0AF8: samp add_message_to_chat "CoordsMaster by Camper96 Deactived"
 
:coordmaster_967
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
02CE: 2@ = ground_z_at 0@ 1@ 999.0
Actor.PutAt($PLAYER_ACTOR, 0@, 1@, 2@)
Actor.LockInCurrentPosition($PLAYER_ACTOR) = False
if
  Car.Defined(30@)
jf @coordmaster_1041
Car.LockInCurrentPosition(30@) = False
 
:coordmaster_1041
jump @coordmaster_158
 
:coordmaster_1048
SAMP.CmdRet
Ребят,в чем тут ошибка?Он вообще гонит...
Либо вверх тп,то по кругу или туда и обратно...
 

Thomas_Johnson

Известный
Проверенный
183
21
Код:
0B35: samp 0@ = get_last_command_params
0AD4: 3@ = scan_string 0@ format "%c" 11@
if 3@ > 0
then
    0AF8: samp add_message_to_chat "%c" 0xFFFF00 11@
    0B43: cmd_ret
end
Пишет только первую букву, как сделать, чтобы показывал весь параметр?
 

Charlatan

Новичок
Друг
290
18
Какой опкод отвечает за проверку игрока по id, если он находится рядом
 

alfazlo

Потрачен
128
36
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пустая строчка, не читает вообще
Используй напрямую:
Код:
0B35: samp 0@ = get_last_command_params
0AF8: samp add_message_to_chat "%s" 0xFFFF00 0@
Если используешь %s (строка), тогда и переменные должны быть @v
 

Thomas_Johnson

Известный
Проверенный
183
21
Помогло, спасибо
Но теперь другая проблема: При использовании той же переменной 11@ в другом сообщении значение пустеет:c
Как это теперь исправить?
 

hnnssy

Известный
Друг
2,684
2,749
Помогло, спасибо
Но теперь другая проблема: При использовании той же переменной 11@ в другом сообщении значение пустеет:c
Как это теперь исправить?
Выдели для неё память, и после использования очистить не забудь.
 

Kotsik

Новичок
3
0
Нужно сделать так, чтобы персонаж бежал на координаты, например: 0.0, 0.0, 0.0 , потом нажималось 3-5 раз ЛКМ, затем он бежал на координаты, например: 100.0, 100.0. 0.0
И чтобы всё это отключалось и включалось на какую-нибудь клавишу. В общем это бот для бега по координатам, например, для работы грузчика на самп-рп. Тому кто поможет-спасибо.:)
 

alfazlo

Потрачен
128
36
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Нужно сделать так, чтобы персонаж бежал на координаты, например: 0.0, 0.0, 0.0 , потом нажималось 3-5 раз ЛКМ, затем он бежал на координаты, например: 100.0, 100.0. 0.0
И чтобы всё это отключалось и включалось на какую-нибудь клавишу. В общем это бот для бега по координатам, например, для работы грузчика на самп-рп. Тому кто поможет-спасибо.:)
SannyBuilder -> Справка -> Помощь