You are not logged in.
Искал по форуму - ненашел, как найти адреса в структуре, чтоб туда можнобыло что-то записать?ну например записать к-во проеханных метров
Offline
Структура сама по себе представляет набор элементов относящихся к объекту. Бред сивой кобылы короче, нельзя записать кол-во проеханных метров.
Offline
Вообще-то найти свободное место в памяти можно, но обычно это 1-2-3 байта. Для записи пройденного расстояния понадобится 4 байта, а найти столько уже проблематично.
Как пример, можно посмотреть скрипт бензина от yelmi, куда там записывается.
Offline
к-во проеханных метров
думаешь, 2 байта хватит?
Offline
Можно скомбинировать многобитное число из нескольких разрозненных частей.
Или сыграть по-крупному. Поскольку объекты выделяются в пуле, т.е. под экземпляр класса CBoat (размер 0x07E8) будет выделено столько же памяти, сколько и под экземпляр класса CHeli (размер 0x0A18). Естественно, избыточная память висит мертвым грузом и мы можем использовать ее по своему усмотрению. Для этого можно, удостоверившись, что объект является экземпляром, скажем, класса CAutomobile, использовать незанятое пространство по смещению от 0x0988 до 0x0A18.
Offline
Почему кстате бред сразу?во первых скрипты бензина, он остается при выходе из машины (значение в структуре остается, ведь так?)
А моя идея:
Значит находим пару свободных адресов, первый адрес будет равен 1 или 0, ну если значение 0 то машина только взята, там проеханное расстояние еще не записано, ну дак вот, если 0, то берем произвольное значение, и записываем во второй пустой адрес, типо пробег) и в первый адрес записываем 1, дальше идут проверки, если первый адрес = 1 тогда читаем из второго адреса число...дальше в статистике есть расстояние проеханное на машине, от него отсчитываем и перезаписываем во второй адрес расстояние, ну выводя на экран канешно
ну вот пример...
допустим расстояние произвольно выпало 123, ну пускай, в статистике расстояние 123123 , отнимаем = 123000
теперь расстояние в статистике будет увеличиваться, а это значение останется, и будем в цикле отнимать от метров из статистики число 123000, и выводить на экран, проехали стало 123400, значит на машине стало 123400 - 123000 = 400 метров, так получится пробег только этой машины
Может написал и бред xD, но помоиму логично так сделать
Offline
{$CLEO} Thread 'metr' :1 wait 0 if 0256: player $PLAYER_CHAR defined jf @1 if 00DF: actor $PLAYER_ACTOR driving jf @1 03C0: 0@ = actor $PLAYER_ACTOR car :2 wait 0 0A97: 2@ = car 0@ struct 000A: 2@ += 0x0988 0A8D: 3@ = read_memory 2@ size 4 virtual_protect 0 if 8039: not 3@ == 0 jf @3 0A97: 2@ = car 0@ struct 000A: 2@ += 0x0988 0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0 0652: 3@ = integer_stat 4 0062: 3@ -= 2@ // (int) jump @4 :3 wait 0 0099: 5@ = random_int_in_ranges_1_to_500 0A8C: write_memory 2@ size 4 value 5@ virtual_protect 0 wait 100 jump @1 :4 wait 0 if 00DB: actor $PLAYER_ACTOR in_car 0@ jf @1 0652: 4@ = integer_stat 4 0062: 4@ -= 3@ // (int) 03F0: enable_text_draw 1 045A: draw_text_1number 320.00 407.40 GXT 'NUMBER' number 4@ jump @4
не могу понять че не так, вроде начал работать скрипт, но выхожу, захожу обратно в машину и опять одно и тоже значение
Offline
я бы снимал координаты машины, например, каждую секунду, и прибавлял бы к пробегу расстояние между двумя последними точками(не забывая проверку на то, что машина оторвана от земли)
Last edited by 3Doomer (24-02-2011 12:36)
GIMS developer
Offline
{$CLEO} Thread 'odometr' :1 wait 0 if 0256: player $PLAYER_CHAR defined jf @1 if and 00DF: actor $PLAYER_ACTOR driving 847A: not actor $PLAYER_ACTOR driving_bike 84A7: not actor $PLAYER_ACTOR driving_boat 84C8: not actor $PLAYER_ACTOR driving_flying_vehicle jf @1 03C0: 0@ = actor $PLAYER_ACTOR car :2 wait 0 0A97: 10@ = car 0@ struct 000A: 10@ += 0x0988 0A8D: 3@ = read_memory 10@ size 2 virtual_protect 0 if 8039: not 3@ == 0 jf @3 0A8D: 2@ = read_memory 10@ size 2 virtual_protect 0 0652: 3@ = integer_stat 4 0062: 3@ -= 2@ // (int) jump @4 :3 wait 0 0209: 1@ = random_int_in_ranges 1 1000 0A8C: write_memory 10@ size 2 value 1@ virtual_protect 0 wait 100 jump @2 :4 wait 0 if 00DB: actor $PLAYER_ACTOR in_car 0@ jf @1 0652: 4@ = integer_stat 4 0062: 4@ -= 3@ // (int) 03F0: enable_text_draw 1 045A: draw_text_1number 320.00 407.40 GXT 'NUMBER' number 4@ 0A97: 10@ = car 0@ struct 000A: 10@ += 0x0988 0A8C: write_memory 10@ size 2 value 4@ virtual_protect 0 jump @4
УРА! работает))))
Теперь ворос не в тему, а какой опкод или функция или еще чтонибудь может выдать координаты на экране, если известны координаты в пространстве, т.е. как автоприцел в гидре, машина едет а прицел на экране на нее показывает?
Offline
Теперь ворос не в тему, а какой опкод или функция или еще чтонибудь может выдать координаты на экране, если известны координаты в пространстве, т.е. как автоприцел в гидре, машина едет а прицел на экране на нее показывает?
где-то на форуме выкладывали функцию перевода, надо искать
Offline
0x70CE30 BOOL __cdecl WorldCoords2ScreenCoords(RwV3D *inPoint, RwV3D *outpoint, float *x, float *y, char, char)
[large]↗[/large]
Несколько лет назад я пытался использовать эту функцию, но она выдаёт какие-то неправильные координаты:
{$CLEO} {$I stdconsts.txt} var $Player_Actor: Actor 1@: Actor end wait 2000 :begin while true if and 00E1: player 0 pressed_key 6 not $Player_Actor.Driving then if 856D: not actor 1@ defined then 0AB1: call_scm_func @GetTargetPed 0 1@ end if 056D: actor 1@ defined then 03F0: enable_text_draw 1 081C: draw_text_outline 1 RGBA 0 0 0 255 0342: enable_text_draw_centered 1 04C4: store_coords_to 4@ 5@ 6@ from_actor 1@ with_offset 0.0 0.0 0.0 0226: 2@ = actor 1@ health //0AB1: call_scm_func @WorldCoords2ScreenCoords 3 4@ 5@ 6@ to 7@ 8@ 0AB1: call_scm_func @__VarToOffset 1 varnum 4 store_to 18@ 0AB1: call_scm_func @__VarToOffset 1 varnum 13 store_to 19@ 0AB1: call_scm_func @__VarToOffset 1 varnum 7 store_to 20@ 0AB1: call_scm_func @__VarToOffset 1 varnum 8 store_to 21@ 0AA5: call 0x70CE30 num_params 6 pop 6 1 1 21@ 20@ 19@ 18@ 045A: draw_text_1number 7@ 8@ GXT 'DOLLAR' number 2@ // $~1~ end end wait 0 end :__VarToOffset 0A9F: 1@ = current_thread_pointer 1@ += 0x3C 0@ *= 4 005A: 1@ += 0@ // address of the local variable 0AB2: ret 1 1@ :GetTargetPed{out_HPed} {0@ = 300694 0085: 0@ = &0(0@,1i)} 0A8D: 0@ = read_memory 0xB6F3B8 size 4 virtual_protect 0 inc(0@, 0x79C) 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 if 0@ > 0 then 0A8D: 8@ = read_memory 0x00B74490 size 4 virtual_protect 0 0AA8: call_function_method 0x4442D0 struct 8@ num_params 1 pop 0 0@ 1@ if 056D: actor 1@ defined then 0AB2: ret 1 1@ end end 0AB2: ret 1 -1
А вот этот скрипт, о котором упоминал GTASA вообще не использует эту функцию и работает:
// 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--------------- 03A4: name_thread 'PHOTO' :PHOTO_11 0001: wait 0 ms 0A96: 0@ = actor $PLAYER_ACTOR struct 000A: 0@ += 1320 0A8D: 0@ = read_memory 0@ size 1 virtual_protect 0 0A8D: 1@ = read_memory 0xB7CB64 size 4 virtual_protect 0 00D6: if and 02D8: actor $PLAYER_ACTOR current_weapon == 43 0256: player $PLAYER_CHAR defined 08B7: test 0@ bit 4 0023: 0.01 > 1@ 004D: jump_if_false @PHOTO_11 00BA: show_text_styled GXT 'DUMMY' time 1000 style 7 068D: get_camera_position_to 18@ 19@ 20@ 068D: get_camera_position_to 21@ 22@ 23@ 068E: get_camera_target_point_to 24@ 25@ 26@ 0801: get_camera_zoom_factor_to 27@ // float 0A8D: 3@ = read_memory 0xC3EFA4 size 4 virtual_protect 0 0013: 3@ *= 0.75 :PHOTO_175 0001: wait 0 ms 0A8D: 2@ = read_memory 0xB7CB64 size 4 virtual_protect 0 00D6: if 0021: 2@ > 0.1 004D: jump_if_false @PHOTO_175 00D6: if 8248: not model #CAMERA available 004D: jump_if_false @PHOTO_257 0247: load_model #CAMERA 038B: load_requested_models :PHOTO_237 0001: wait 0 ms 00D6: if 0248: model #CAMERA available 004D: jump_if_false @PHOTO_237 :PHOTO_257 0A96: 4@ = actor $PLAYER_ACTOR struct 000A: 4@ += 20 0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 000A: 4@ += 56 0A8D: 17@ = read_memory 4@ size 4 virtual_protect 0 000B: 17@ += -1.5 0A8C: write_memory 4@ size 4 value 17@ virtual_protect 0 000B: 17@ += 1.5 0107: 4@ = create_object #CAMERA at 0.0 0.0 0.0 0382: set_object 4@ collision_detection 0 0550: keep_object 4@ in_memory 1 0750: set_object 4@ visibility 0 015F: set_camera_position 21@ 22@ 23@ rotation 0.0 0.0 0.0 0160: set_camera_point_at 24@ 25@ 26@ mode 2 0922: set_camera_zoom_in_factor 27@ out_factor 27@ timelimit 40 mode 1 0063: 24@ -= 21@ // (float) 0063: 25@ -= 22@ // (float) 0063: 26@ -= 23@ // (float) 050A: 30@ = distance_between_XYZ 24@ 25@ 26@ and_XYZ 0.0 0.0 0.0 0073: 24@ /= 30@ // (float) 0073: 25@ /= 30@ // (float) 0073: 26@ /= 30@ // (float) 0087: 28@ = 24@ // (float) 0087: 29@ = 25@ // (float) 0050: gosub @PHOTO_8974 0087: 23@ = 27@ // (float) 0087: 28@ = 26@ // (float) 0509: 29@ = distance_between_XY 24@ 25@ and_XY 0.0 0.0 0050: gosub @PHOTO_8974 0087: 21@ = 27@ // (float) 0453: set_object 4@ XY_rotation 21@ 23@ angle 0.0 015D: set_gamespeed 0.0 03F0: enable_text_draw 1 0A8D: 1@ = read_memory 0xB610E0 size 4 virtual_protect 0 :PHOTO_623 0001: wait 0 ms 0A8D: 0@ = read_memory 0xB610E0 size 4 virtual_protect 0 0062: 0@ -= 1@ // (int) 0016: 0@ /= 250 00D6: if 001B: 11 > 0@ 004D: jump_if_false @PHOTO_682 0006: 16@ = 0 :PHOTO_682 0871: init_jump_table 0@ total_jumps 12 default_jump 0 @PHOTO_6640 jumps 0 @PHOTO_623 1 @PHOTO_623 2 @PHOTO_5872 3 @PHOTO_5140 4 @PHOTO_2511 5 @PHOTO_1899 6 @PHOTO_1299 0872: jump_table_jumps 7 @PHOTO_810 8 @PHOTO_810 9 @PHOTO_810 10 @PHOTO_810 11 @PHOTO_6640 -1 @PHOTO_5872 -1 @PHOTO_5872 -1 @PHOTO_5872 -1 @PHOTO_5872 :PHOTO_810 0006: 6@ = 0 0006: 0@ = 0xB71F80 0006: 30@ = 0 :PHOTO_834 0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0 00D6: if 0039: 21@ == 20 004D: jump_if_false @PHOTO_878 000A: 0@ += 40 0002: jump @PHOTO_1205 :PHOTO_878 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 16 0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 006B: 5@ *= 5@ // (float) 000B: 5@ += 0.5 0092: 5@ = float 5@ to_integer 0012: 5@ *= 5 000A: 0@ += 12 000B: 23@ += 0.1 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_1052 0002: jump @PHOTO_1205 :PHOTO_1052 000B: 23@ += -0.1 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_1137 0002: jump @PHOTO_1205 :PHOTO_1137 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.275 1.1 0340: set_text_draw_RGBA 255 128 0 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_1205 000A: 30@ += 1 0019: 30@ > 59 004D: jump_if_false @PHOTO_834 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 255 128 0 255 045A: draw_text_1number 608.0 280.0 GXT 'DOLLAR' number 6@ // $~1~ :PHOTO_1299 0006: 6@ = 0 0006: 0@ = 13092680 0006: 30@ = 0 :PHOTO_1323 000A: 0@ += 24 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 00D6: if 0039: 21@ == 0 004D: jump_if_false @PHOTO_1374 000A: 0@ += 20 0002: jump @PHOTO_1805 :PHOTO_1374 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0085: 5@ = 21@ // (int) 005A: 5@ += 22@ // (int) 00D6: if or 001D: 23@ > 5@ // (int) 001D: 21@ > 23@ // (int) 004D: jump_if_false @PHOTO_1483 000A: 0@ += 12 0002: jump @PHOTO_1805 :PHOTO_1483 0062: 5@ -= 23@ // (int) 0093: 22@ = integer 22@ to_float 0093: 5@ = integer 5@ to_float 0073: 5@ /= 22@ // (float) 0013: 5@ *= 20.0 000B: 5@ += 0.5 0092: 5@ = float 5@ to_integer 0012: 5@ *= 5 000A: 0@ += -20 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 24 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_1662 0002: jump @PHOTO_1805 :PHOTO_1662 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_1737 0002: jump @PHOTO_1805 :PHOTO_1737 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.34375 1.375 0340: set_text_draw_RGBA 255 255 0 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_1805 000A: 30@ += 1 0019: 30@ > 15 004D: jump_if_false @PHOTO_1323 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 255 255 0 255 045A: draw_text_1number 608.0 252.0 GXT 'DOLLAR' number 6@ // $~1~ :PHOTO_1899 0006: 6@ = 0 0006: 0@ = 13144488 0006: 30@ = 0 :PHOTO_1923 000A: 0@ += 16 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 00D6: if 0039: 21@ == 0 004D: jump_if_false @PHOTO_1974 000A: 0@ += 20 0002: jump @PHOTO_2417 :PHOTO_1974 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += -28 0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 00D6: if or 0039: 5@ == 16 0039: 5@ == 18 004D: jump_if_false @PHOTO_2083 0006: 5@ = 500 :PHOTO_2083 00D6: if or 0039: 5@ == 17 0039: 5@ == 58 004D: jump_if_false @PHOTO_2116 0006: 5@ = 250 :PHOTO_2116 00D6: if 0039: 5@ == 39 004D: jump_if_false @PHOTO_2142 0006: 5@ = 750 :PHOTO_2142 00D6: if 0039: 5@ == 19 004D: jump_if_false @PHOTO_2168 0006: 5@ = 1000 :PHOTO_2168 00D6: if 0039: 5@ == 20 004D: jump_if_false @PHOTO_2194 0006: 5@ = 1500 :PHOTO_2194 000A: 0@ += 36 00D6: if 001B: 100 > 5@ 004D: jump_if_false @PHOTO_2226 0002: jump @PHOTO_2417 :PHOTO_2226 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_2274 0002: jump @PHOTO_2417 :PHOTO_2274 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_2349 0002: jump @PHOTO_2417 :PHOTO_2349 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.4125 1.65 0340: set_text_draw_RGBA 0 255 128 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_2417 000A: 30@ += 1 0019: 30@ > 31 004D: jump_if_false @PHOTO_1923 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 0 255 128 255 045A: draw_text_1number 608.0 224.0 GXT 'DOLLAR' number 6@ // $~1~ :PHOTO_2511 0006: 6@ = 0 0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 31@ = read_memory 0xB74490 size 4 virtual_protect 0 000A: 31@ += 4 0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0 0006: 30@ = 0 :PHOTO_2584 0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0 000A: 31@ += 1 00D6: if or 001B: 0 > 21@ 0019: 21@ > 127 004D: jump_if_false @PHOTO_2643 000A: 0@ += 1988 0002: jump @PHOTO_5045 :PHOTO_2643 0085: 23@ = 30@ // (int) 0012: 23@ *= 256 005A: 23@ += 21@ // (int) 00D6: if 003C: $PLAYER_ACTOR == 23@ // (int) 004D: jump_if_false @PHOTO_2701 000A: 0@ += 1988 0002: jump @PHOTO_5045 :PHOTO_2701 000A: 0@ += 1344 0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 0073: 5@ /= 21@ // (float) 0013: 5@ *= -1.0 000B: 5@ += 2.0 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 5@ *= 21@ // (float) 0017: 5@ /= 10.0 000A: 0@ += 468 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 0007: 22@ = 0.0 00D6: if or 0039: 21@ == 1 0039: 21@ == 9 0039: 21@ == 10 0039: 21@ == 12 004D: jump_if_false @PHOTO_2877 0007: 22@ = 5.0 :PHOTO_2877 00D6: if 0039: 21@ == 2 004D: jump_if_false @PHOTO_2905 0007: 22@ = 15.0 :PHOTO_2905 00D6: if or 0039: 21@ == 3 0039: 21@ == 4 004D: jump_if_false @PHOTO_2940 0007: 22@ = 20.0 :PHOTO_2940 00D6: if or 0039: 21@ == 5 0039: 21@ == 6 0039: 21@ == 8 004D: jump_if_false @PHOTO_2982 0007: 22@ = 25.0 :PHOTO_2982 00D6: if 0039: 21@ == 7 004D: jump_if_false @PHOTO_3010 0007: 22@ = 75.0 :PHOTO_3010 000A: 0@ += -496 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 00D6: if 0019: 21@ > 3 004D: jump_if_false @PHOTO_3058 0013: 22@ *= 2.0 :PHOTO_3058 000A: 0@ += -36 0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0 000A: 0@ += -1216 00D6: if and 0019: 21@ > 0 001B: 10001 > 21@ 004D: jump_if_false @PHOTO_3147 0093: 21@ = integer 21@ to_float 0013: 21@ *= 0.0003 000B: 21@ += 2.0 006B: 22@ *= 21@ // (float) :PHOTO_3147 005B: 5@ += 22@ // (float) 0007: 22@ = 0.0 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 1912 0013: 22@ *= 1000.0 005B: 5@ += 22@ // (float) 00D6: if or 0611: actor 23@ performing_animation "BIKE_fallR" 0611: actor 23@ performing_animation "BIKE_fall_off" 0611: actor 23@ performing_animation "CAR_jackedLHS" 0611: actor 23@ performing_animation "CAR_jackedRHS" 0611: actor 23@ performing_animation "CAR_Qjacked" 0611: actor 23@ performing_animation "cower" 0611: actor 23@ performing_animation "DUCK_cower" 0611: actor 23@ performing_animation "EV_step" 0611: actor 23@ performing_animation "gas_cwr" 004D: jump_if_false @PHOTO_3462 000B: 5@ += 25.0 :PHOTO_3462 00D6: if or 0611: actor 23@ performing_animation "abseil" 0611: actor 23@ performing_animation "CAR_pulloutL_LHS" 0611: actor 23@ performing_animation "CAR_pulloutL_RHS" 0611: actor 23@ performing_animation "CAR_pullout_LHS" 0611: actor 23@ performing_animation "CAR_pullout_RHS" 0611: actor 23@ performing_animation "Crouch_Roll_L" 0611: actor 23@ performing_animation "Crouch_Roll_R" 0611: actor 23@ performing_animation "FALL_skyDive" 0611: actor 23@ performing_animation "handscower" 004D: jump_if_false @PHOTO_3662 000B: 5@ += 25.0 :PHOTO_3662 00D6: if or 0611: actor 23@ performing_animation "CAR_crawloutRHS" 0611: actor 23@ performing_animation "CAR_rollout_LHS" 0611: actor 23@ performing_animation "CAR_rollout_RHS" 0611: actor 23@ performing_animation "EV_dive" 0611: actor 23@ performing_animation "FALL_back" 0611: actor 23@ performing_animation "FALL_fall" 0611: actor 23@ performing_animation "FALL_front" 0611: actor 23@ performing_animation "handscower" 0611: actor 23@ performing_animation "handsup" 004D: jump_if_false @PHOTO_3843 000B: 5@ += 50.0 :PHOTO_3843 00D6: if or 0611: actor 23@ performing_animation "CLIMB_jump" 0611: actor 23@ performing_animation "CLIMB_jump_B" 0611: actor 23@ performing_animation "CLIMB_Pull" 0611: actor 23@ performing_animation "CLIMB_Stand" 0611: actor 23@ performing_animation "FALL_glide" 0611: actor 23@ performing_animation "JUMP_glide" 004D: jump_if_false @PHOTO_3969 000B: 5@ += 10.0 :PHOTO_3969 00D6: if or 0611: actor 23@ performing_animation "DAM_armL_frmBK" 0611: actor 23@ performing_animation "DAM_armL_frmFT" 0611: actor 23@ performing_animation "DAM_armL_frmLT" 0611: actor 23@ performing_animation "DAM_armR_frmBK" 0611: actor 23@ performing_animation "DAM_armR_frmFT" 0611: actor 23@ performing_animation "DAM_armR_frmRT" 0611: actor 23@ performing_animation "DAM_LegL_frmBK" 0611: actor 23@ performing_animation "DAM_LegL_frmFT" 0611: actor 23@ performing_animation "DAM_LegL_frmLT" 004D: jump_if_false @PHOTO_4179 000B: 5@ += 50.0 :PHOTO_4179 00D6: if or 0611: actor 23@ performing_animation "DAM_LegR_frmBK" 0611: actor 23@ performing_animation "DAM_LegR_frmFT" 0611: actor 23@ performing_animation "DAM_LegR_frmRT" 0611: actor 23@ performing_animation "DAM_stomach_frmBK" 0611: actor 23@ performing_animation "DAM_stomach_frmFT" 0611: actor 23@ performing_animation "DAM_stomach_frmLT" 0611: actor 23@ performing_animation "DAM_stomach_frmRT" 0611: actor 23@ performing_animation "LRGIRL_IDLE_TO_L0" 0611: actor 23@ performing_animation "LRGIRL_IDLE_TO_L0" 004D: jump_if_false @PHOTO_4407 000B: 5@ += 50.0 :PHOTO_4407 00D6: if or 0611: actor 23@ performing_animation "HitA_1" 0611: actor 23@ performing_animation "HitA_2" 0611: actor 23@ performing_animation "HitA_3" 0611: actor 23@ performing_animation "HIT_back" 0611: actor 23@ performing_animation "HIT_behind" 0611: actor 23@ performing_animation "HIT_front" 0611: actor 23@ performing_animation "HIT_GUN_BUTT" 0611: actor 23@ performing_animation "HIT_L" 0611: actor 23@ performing_animation "HIT_R" 004D: jump_if_false @PHOTO_4558 000B: 5@ += 25.0 :PHOTO_4558 00D6: if or 0611: actor 23@ performing_animation "Drown" 0611: actor 23@ performing_animation "KO_shot_face" 0611: actor 23@ performing_animation "KO_shot_front" 0611: actor 23@ performing_animation "KO_shot_stom" 0611: actor 23@ performing_animation "KO_skid_back" 0611: actor 23@ performing_animation "KO_skid_front" 0611: actor 23@ performing_animation "KO_spin_L" 0611: actor 23@ performing_animation "KO_spin_R" 004D: jump_if_false @PHOTO_4720 000B: 5@ += 75.0 :PHOTO_4720 00D6: if 09A8: actor 23@ headshoted 004D: jump_if_false @PHOTO_4746 000B: 5@ += 75.0 :PHOTO_4746 00D6: if and 8184: not actor 23@ health >= 1 8118: not actor 23@ dead 004D: jump_if_false @PHOTO_4779 000B: 5@ += 100.0 :PHOTO_4779 00D6: if 0118: actor 23@ dead 004D: jump_if_false @PHOTO_4805 000B: 5@ += 50.0 :PHOTO_4805 00A0: store_actor 23@ position_to 21@ 22@ 23@ 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_4867 0002: jump @PHOTO_5045 :PHOTO_4867 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_4942 0002: jump @PHOTO_5045 :PHOTO_4942 0013: 5@ *= 0.2 000B: 5@ += 0.5 0092: 5@ = float 5@ to_integer 0012: 5@ *= 5 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.4125 1.65 0340: set_text_draw_RGBA 0 128 255 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_5045 000A: 30@ += 1 0019: 30@ > 139 004D: jump_if_false @PHOTO_2584 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 0 128 255 255 045A: draw_text_1number 608.0 196.0 GXT 'DOLLAR' number 6@ // $~1~ :PHOTO_5140 0006: 6@ = 0 0A8D: 0@ = read_memory 0xB74494 size 4 virtual_protect 0 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 31@ = read_memory 0xB74494 size 4 virtual_protect 0 000A: 31@ += 4 0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0 0006: 30@ = 0 :PHOTO_5213 0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0 000A: 31@ += 1 00D6: if or 001B: 0 > 21@ 0019: 21@ > 127 004D: jump_if_false @PHOTO_5272 000A: 0@ += 2584 0002: jump @PHOTO_5779 :PHOTO_5272 0085: 23@ = 30@ // (int) 0012: 23@ *= 256 005A: 23@ += 21@ // (int) 000A: 0@ += 1216 0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 0017: 5@ /= 1000.0 0013: 5@ *= -1.0 000B: 5@ += 2.0 0013: 5@ *= 10.0 000A: 0@ += -1148 0007: 22@ = 0.0 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 006B: 21@ *= 21@ // (float) 005B: 22@ += 21@ // (float) 000A: 0@ += 2508 0013: 22@ *= 10.0 005B: 5@ += 22@ // (float) 0441: 22@ = car 23@ model 09E1: get_car_model 22@ price_to 22@ 0093: 22@ = integer 22@ to_float 0017: 22@ /= 2500.0 005B: 5@ += 22@ // (float) 00AA: store_car 23@ position_to 21@ 22@ 23@ 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_5602 0002: jump @PHOTO_5779 :PHOTO_5602 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_5677 0002: jump @PHOTO_5779 :PHOTO_5677 0013: 5@ *= 0.2 000B: 5@ += 0.5 0092: 5@ = float 5@ to_integer 0012: 5@ *= 5 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.4125 1.65 0340: set_text_draw_RGBA 0 255 0 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_5779 000A: 30@ += 1 0019: 30@ > 109 004D: jump_if_false @PHOTO_5213 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 0 255 0 255 045A: draw_text_1number 608.0 168.0 GXT 'DOLLAR' number 6@ // $~1~ :PHOTO_5872 0006: 6@ = 0 0006: 0@ = 0xC88950 0006: 30@ = 0 :PHOTO_5896 000A: 0@ += 32 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 12 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0093: 23@ = integer 23@ to_float 00D6: if or 0025: 23@ > 21@ // (float) 0025: 22@ > 23@ // (float) 004D: jump_if_false @PHOTO_5997 000A: 0@ += 80 0002: jump @PHOTO_6540 :PHOTO_5997 0063: 21@ -= 22@ // (float) 0063: 23@ -= 22@ // (float) 0073: 23@ /= 21@ // (float) 000B: 23@ += 1.0 0087: 21@ = 23@ // (float) 000A: 0@ += -44 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 00D6: if or 0039: 23@ == 4 0039: 23@ == 5 0039: 23@ == 8 0039: 23@ == 9 0039: 23@ == 12 004D: jump_if_false @PHOTO_6114 0007: 5@ = 1000.0 :PHOTO_6114 00D6: if 0039: 23@ == 1 004D: jump_if_false @PHOTO_6142 0007: 5@ = 1500.0 :PHOTO_6142 00D6: if or 0039: 23@ == 0 0039: 23@ == 2 0039: 23@ == 3 0039: 23@ == 11 004D: jump_if_false @PHOTO_6191 0007: 5@ = 2000.0 :PHOTO_6191 00D6: if or 0039: 23@ == 6 0039: 23@ == 7 0039: 23@ == 10 004D: jump_if_false @PHOTO_6233 0007: 5@ = 2500.0 :PHOTO_6233 006B: 5@ *= 21@ // (float) 0017: 5@ /= 10.0 0092: 5@ = float 5@ to_integer 0012: 5@ *= 5 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 112 000B: 23@ += 0.1 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_6388 0002: jump @PHOTO_6540 :PHOTO_6388 000B: 23@ += -0.1 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_6473 0002: jump @PHOTO_6540 :PHOTO_6473 0050: gosub @PHOTO_8699 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 255 0 0 255 045A: draw_text_1number 24@ 25@ GXT 'DOLLAR' number 5@ // $~1~ 005A: 16@ += 5@ // (int) 005A: 6@ += 5@ // (int) :PHOTO_6540 000A: 30@ += 1 0019: 30@ > 15 004D: jump_if_false @PHOTO_5896 0050: gosub @PHOTO_8699 03E4: enable_text_draw_align_right 1 081C: draw_text_outline 2 RGBA 0 0 0 255 033F: set_text_draw_letter_size 0.55 2.2 0340: set_text_draw_RGBA 255 0 0 255 045A: draw_text_1number 608.0 140.0 GXT 'DOLLAR' number 6@ // $~1~ 0002: jump @PHOTO_623 :PHOTO_6640 01E3: show_text_1number_styled GXT 'REWARD' number 16@ time 5000 style 7 // REWARD $~1~ 0109: player $PLAYER_CHAR money += 16@ 0006: 6@ = 0 0006: 0@ = 0xB71F80 0006: 30@ = 0 :PHOTO_6691 0A8D: 21@ = read_memory 0@ size 2 virtual_protect 0 00D6: if 0039: 21@ == 20 004D: jump_if_false @PHOTO_6735 000A: 0@ += 40 0002: jump @PHOTO_7003 :PHOTO_6735 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 28 000B: 23@ += 0.1 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_6857 0002: jump @PHOTO_7003 :PHOTO_6857 000B: 23@ += -0.1 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_6942 0002: jump @PHOTO_7003 :PHOTO_6942 000A: 0@ += -16 0A8D: 5@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0A8C: write_memory 0@ size 4 value 5@ virtual_protect 0 000A: 0@ += 4 0A8C: write_memory 0@ size 4 value 0.0 virtual_protect 0 000A: 0@ += 12 :PHOTO_7003 000A: 30@ += 1 0019: 30@ > 59 004D: jump_if_false @PHOTO_6691 0006: 6@ = 0 0006: 0@ = 0xC7C748 0006: 30@ = 0 :PHOTO_7048 000A: 0@ += 24 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 00D6: if 0039: 21@ == 0 004D: jump_if_false @PHOTO_7099 000A: 0@ += 20 0002: jump @PHOTO_7420 :PHOTO_7099 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0085: 5@ = 21@ // (int) 005A: 5@ += 22@ // (int) 00D6: if or 001D: 23@ > 5@ // (int) 001D: 21@ > 23@ // (int) 004D: jump_if_false @PHOTO_7208 000A: 0@ += 12 0002: jump @PHOTO_7420 :PHOTO_7208 000A: 0@ += -20 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 24 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_7320 0002: jump @PHOTO_7420 :PHOTO_7320 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_7395 0002: jump @PHOTO_7420 :PHOTO_7395 000A: 0@ += -12 0A8C: write_memory 0@ size 4 value 0 virtual_protect 0 000A: 0@ += 12 :PHOTO_7420 000A: 30@ += 1 0019: 30@ > 15 004D: jump_if_false @PHOTO_7048 0006: 6@ = 0 0006: 0@ = 0xC891A8 0006: 30@ = 0 :PHOTO_7465 000A: 0@ += 16 0A8D: 21@ = read_memory 0@ size 1 virtual_protect 0 00D6: if 0039: 21@ == 0 004D: jump_if_false @PHOTO_7516 000A: 0@ += 20 0002: jump @PHOTO_7847 :PHOTO_7516 000A: 0@ += 4 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += -28 0A8D: 5@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 36 00D6: if and 8039: not 5@ == 16 8039: not 5@ == 17 8039: not 5@ == 18 8039: not 5@ == 19 8039: not 5@ == 20 8039: not 5@ == 39 8039: not 5@ == 58 004D: jump_if_false @PHOTO_7666 0002: jump @PHOTO_7847 :PHOTO_7666 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_7714 0002: jump @PHOTO_7847 :PHOTO_7714 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_7789 0002: jump @PHOTO_7847 :PHOTO_7789 000A: 0@ += -36 0A8C: write_memory 0@ size 4 value 0 virtual_protect 0 000A: 0@ += 12 0A8D: 5@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0A8C: write_memory 0@ size 4 value 5@ virtual_protect 0 000A: 0@ += 24 :PHOTO_7847 000A: 30@ += 1 0019: 30@ > 31 004D: jump_if_false @PHOTO_7465 0006: 6@ = 0 0A8D: 0@ = read_memory 0xB74490 size 4 virtual_protect 0 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 31@ = read_memory 0xB74490 size 4 virtual_protect 0 000A: 31@ += 4 0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0 0006: 30@ = 0 :PHOTO_7941 0A8D: 21@ = read_memory 31@ size 1 virtual_protect 0 000A: 31@ += 1 000A: 0@ += 1988 00D6: if or 001B: 0 > 21@ 0019: 21@ > 127 004D: jump_if_false @PHOTO_8000 0002: jump @PHOTO_8222 :PHOTO_8000 0085: 23@ = 30@ // (int) 0012: 23@ *= 256 005A: 23@ += 21@ // (int) 00D6: if 003C: $PLAYER_ACTOR == 23@ // (int) 004D: jump_if_false @PHOTO_8050 0002: jump @PHOTO_8222 :PHOTO_8050 005B: 5@ += 22@ // (float) 00A0: store_actor 23@ position_to 21@ 22@ 23@ 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_8120 0002: jump @PHOTO_8222 :PHOTO_8120 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_8195 0002: jump @PHOTO_8222 :PHOTO_8195 000A: 0@ += -704 0A8C: write_memory 0@ size 2 value 0 virtual_protect 0 000A: 0@ += 704 :PHOTO_8222 000A: 30@ += 1 0019: 30@ > 139 004D: jump_if_false @PHOTO_7941 0006: 0@ = 0xC88950 0006: 30@ = 0 :PHOTO_8261 000A: 0@ += 32 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 12 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 0A8D: 23@ = read_memory 0xB7CB84 size 4 virtual_protect 0 0093: 23@ = integer 23@ to_float 00D6: if or 0025: 23@ > 21@ // (float) 0025: 22@ > 23@ // (float) 004D: jump_if_false @PHOTO_8362 000A: 0@ += 80 0002: jump @PHOTO_8588 :PHOTO_8362 000A: 0@ += -12 0A8C: write_memory 0@ size 4 value 23@ virtual_protect 0 000A: 0@ += 16 0A8D: 21@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 22@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 4 0A8D: 23@ = read_memory 0@ size 4 virtual_protect 0 000A: 0@ += 112 000B: 23@ += 0.1 00D6: if 86BD: not no_obstacles_between 21@ 22@ 23@ and 18@ 19@ 20@ solid 1 car 0 actor 0 object 0 particle 0 004D: jump_if_false @PHOTO_8503 0002: jump @PHOTO_8588 :PHOTO_8503 000B: 23@ += -0.1 0050: gosub @PHOTO_8734 00D6: if or 0023: 0.0 > 24@ 0021: 24@ > 640.0 0023: 0.0 > 25@ 0021: 25@ > 448.0 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_8588 0002: jump @PHOTO_8588 :PHOTO_8588 000A: 30@ += 1 0019: 30@ > 15 004D: jump_if_false @PHOTO_8261 0108: destroy_object 4@ 0A96: 4@ = actor $PLAYER_ACTOR struct 000A: 4@ += 20 0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 000A: 4@ += 56 0A8C: write_memory 4@ size 4 value 17@ virtual_protect 0 0249: release_model #CAMERA 0922: set_camera_zoom_in_factor 70.0 out_factor 70.0 timelimit 80 mode 1 015A: restore_camera 03F0: enable_text_draw 0 015D: set_gamespeed 2@ 0002: jump @PHOTO_11 :PHOTO_8699 0342: enable_text_draw_centered 0 0345: enable_text_draw_background 0 0348: enable_text_draw_proportional 0 03E4: enable_text_draw_align_right 0 0349: set_text_draw_font 3 081C: draw_text_outline 1 RGBA 0 0 0 255 0051: return :PHOTO_8734 068D: get_camera_position_to 24@ 25@ 26@ 0063: 24@ -= 21@ // (float) 0063: 25@ -= 22@ // (float) 0063: 26@ -= 23@ // (float) 0013: 24@ *= -1.0 0013: 25@ *= -1.0 0400: store_coords_to 24@ 25@ 26@ from_object 4@ with_offset 24@ 26@ 25@ 0073: 24@ /= 26@ // (float) 0073: 25@ /= 26@ // (float) 0801: get_camera_zoom_factor_to 23@ // float 0017: 23@ /= 2.0 02F7: 21@ = cosine 23@ // (float) 02F6: 22@ = sine 23@ // (float) 0073: 21@ /= 22@ // (float) 006B: 24@ *= 21@ // (float) 006B: 25@ *= 21@ // (float) 0013: 24@ *= 320.0 0013: 25@ *= 298.66 00D6: if 0023: 0.0 > 26@ 004D: jump_if_false @PHOTO_8944 0013: 24@ *= -1.0 0013: 25@ *= -1.0 :PHOTO_8944 006B: 25@ *= 3@ // (float) 000B: 24@ += 320.5 000B: 25@ += 224.5 0051: return :PHOTO_8974 0509: 27@ = distance_between_XY 28@ 29@ and_XY 0.0 0.0 0073: 28@ /= 27@ // (float) 0073: 29@ /= 27@ // (float) 0509: 27@ = distance_between_XY 28@ 29@ and_XY 0.0 1.0 0006: 0@ = 0 :PHOTO_9039 0017: 27@ /= 2.0 006B: 27@ *= 27@ // (float) 0087: 29@ = 27@ // (float) 0013: 27@ *= -1.0 000B: 27@ += 1.0 01FB: 27@ = square_root 27@ 0013: 27@ *= -1.0 000B: 27@ += 1.0 006B: 27@ *= 27@ // (float) 005B: 27@ += 29@ // (float) 01FB: 27@ = square_root 27@ 000A: 0@ += 1 0019: 0@ > 11 004D: jump_if_false @PHOTO_9039 0013: 27@ *= 4096.0 0017: 27@ /= 3.141529 0013: 27@ *= 180.0 00D6: if 0021: 28@ > 0.0 004D: jump_if_false @PHOTO_9229 0013: 27@ *= -1.0 000B: 27@ += 360.0 :PHOTO_9229 0051: return
Last edited by VcSaJen (28-02-2011 16:05)
[small][/small]
Offline
Определение функции должно быть примерно таким:
bool __cdecl ConvertGlobalXYZToScreenXY(RwV3D *inPoint, RwV3D *camProectOffset, float *pXMult, float *pYMult, bool clipFar, bool clipNear)
{$cleo} 0000: while true wait 0 if 0AD2: 0@ = player 0 targeted_actor //IF and SET then 04C4: store_coords_to 0@ 1@ 2@ from_actor 0@ with_offset 0.0 0.0 1.0 0AA7: call_function 0x70CE30 num_params 6 pop 6 clipNear 1 clipFar 1 yMult 7@v xMult 6@v outVector 2@v inVector 0@v result 5@ if 5@ == 0 then continue end 0092: 0@ = floor 2@ 0092: 1@ = floor 3@ 0073: 2@ /= 6@ 0073: 2@ /= 4@ 0073: 3@ /= 7@ 0073: 3@ /= 4@ 2@ *= 640.0 3@ *= 480.0 03F0: enable_text_draw 1 0343: set_text_draw_linewidth 640.0 0342: enable_text_draw_centered 1 045B: draw_text_2numbers 2@ 3@ GXT 'TIME' numbers 0@ 1@ // ~1~:~1~ end end
Offline
Alien, спасибо, то что надо, разобрался), но я не очень понимаю зачем опкоды
0092: 0@ = floor 2@ 0092: 1@ = floor 3@
что они показывают на экране?
для меня главное положения на экране координаты это 2@ и 3@
можнобылобы
045B: draw_text_2numbers 2@ 3@ GXT 'TIME' numbers 2@ 3@ // ~1~:~1~
xD
Offline
на экране не может быть дробных координат
На экран можно выводить дробные значения:
07FC: text_draw_1float_position_XY 50.0 50.0 GXT_reference 'BB_05' value 7@ decimal_count 3
Выводит Float число, параметр decimal_count - количество десятичных знаков после запятой (в GXT должно быть ~1~.~1~).
Пример. Выводит на экран расстояние (флоат с 3-мя знаками после запятой) между игроком и актёром в которого целится игрок.
{$cleo} 0000: while true wait 0 if Player.Defined($PLAYER_CHAR) then if 0AD2: 0@ = player 0 targeted_actor //IF and SET then 04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0 050A: 7@ = distance_between_XYZ 1@ 2@ 3@ and_XYZ 4@ 5@ 6@ 03F0: enable_text_draw 1 0343: set_text_draw_linewidth 640.0 07FC: text_draw_1float_position_XY 50.0 50.0 GXT_reference 'BB_05' value 7@ decimal_count 3 end end end
Offline
Целую часть можно и
0092: 22@ = float 17@ to_integer
вот этим опкодом взять
Offline
вот этим опкодом взять
Это тот же опкод - номера совпадают.
floor берёт целую часть от дробного числа.
Лучше сказать "переводит дробное число в целое", т.к. разные типы чисел представляются в памяти по-разному.
Last edited by Den_spb (02-03-2011 16:15)
Offline
Помимо floor() существует еще способ ceil() целочисленного округления. Так, для ликбеза...
Offline
Вообще-то 0092 это Trunc, а не Floor.
число 0092 trunc ceil floor round 0.6 0 0 1 0 1 0.4 0 0 1 0 0 -1.6 -1 -1 -1 -2 -2 -1.4 -1 -1 -1 -2 -1 -1.0 -1 -1 -1 -1 -1
Last edited by VcSaJen (03-03-2011 09:17)
[small][/small]
Offline
упсь xD, на номера то не посмотрел....
Offline