Jump to content

SCM function problem.


ussr_cccp

Recommended Posts

I want to make laser aiming spot Like airsupport mod by Ryusuke

that allow player to target solid buildings or object

and call heli to attack there.

I was borrow codes from Wesser .

then I tested it in SA the game was crashes why?? confused.gif

 

 

// 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---------------0000: NOP :NONAME_20001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_2 00D6: if 0ADC:   test_cheat "HELLO" 004D: jump_if_false @NONAME_2 0A92: create_custom_thread "C2.cs"0172: 0@ = actor $PLAYER_ACTOR Z_angle 000F: 0@ -= 180.0 0247: load_model #ANDROM 0247: load_model #CELLPHONE 0247: load_model #ARMY 038B: load_requested_models :NONAME_770001: wait 0 ms 0248:   model #ANDROM available 0248:   model #CELLPHONE available 0248:   model #ARMY available 004D: jump_if_false @NONAME_77 01B4: set_player $PLAYER_CHAR can_move 0 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 1.5 0.6 rotation 0.0 0.2 0.6 0.0 2 0967: actor $PLAYER_ACTOR move_mouth 2000 ms 0001: wait 5000 ms 0968: actor $PLAYER_ACTOR stop_mouth 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 450.0 450.0 00A5: 1@ = create_car #ANDROM at 1@ 2@ 3@ 0ACA: show_text_box "THE SUPPORTER IS NOW COMING" 0175: set_car 1@ Z_angle_to 0@ 04C4: store_coords_to 16@ 17@ 18@ from_actor $PLAYER_ACTOR with_offset 0.0 -100.0 0.0 04D2: set_plane 1@ fly_autopilot_around_point 16@ 17@ 18@ altitude_between 600.0 and 600.0 0710: plane 1@ follow_actor $PLAYER_ACTOR follow_car -1 radius 600.0 02AC: set_car 1@ immunities BP 1 FP 1 EP 1 CP 1 MP 1 00AD: set_car 1@ max_speed_to 50 0186: 2@ = create_marker_above_car 1@ 0165: set_marker 2@ color_to 1 0168: set_marker 2@ size 1 0006: 30@ = 0 015A: restore_camera 01B4: set_player $PLAYER_CHAR can_move 1 0001: wait 190 ms 000A: 30@ += 1 0407: store_coords_to 14@ 19@ 30@ from_car 1@ with_offset 0.0 0.0 0.0 :NONAME_4380A8C: write_memory 12677196 size 1 value 105 virtual_protect 0 0A8C: write_memory 5831615 size 4 value -1869574000 virtual_protect 1 0A8C: write_memory 5831619 size 1 value 144 virtual_protect 1 0001: wait 0 ms 0470: 0@ = actor $PLAYER_ACTOR current_weapon 0012: 0@ *= 112 000A: 0@ += 13150904 000A: 0@ += 8 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@ 0AB1: call_scm_func @NONAME_662 4 0@ 1@ 2@ 3@ 4@ 5@ 6@ 7@ 8@ 9@ 0AB1: call_scm_func @NONAME_761 6 4@ 5@ 6@ 7@ 8@ 9@ 10@ 11@ 12@ 04D5: create_corona_at 10@ 11@ 12@ radius 0.99 type 0 flare 0 RGB 255 100 5000D6: if 00E1:   player 0 pressed_key 17 004D: jump_if_false @NONAME_14235  :NONAME_50000D6: if 00E1: player 0  key_pressed 6 jf @NONAME_14235:NONAME_14235jump @NONAME_1423:NONAME_6620A9F: 10@ = current_thread_pointer 0AB1: call_scm_func @NONAME_1315 2 10@ 4 11@ 0AB1: call_scm_func @NONAME_1315 2 10@ 7 12@ 0AA6: call_method 5327216 11989032 num_params 6 pop 0 12@ 11@ 3@ 2@ 1@ 0@  0AB2: ret 6 4@ 5@ 6@ 7@ 8@ 9@ :NONAME_7610A96: 10@ = actor $PLAYER_ACTOR struct 0AB1: call_scm_func @NONAME_925 12 0@ 1@ 2@ 3@ 4@ 5@ 1 1 1 1 0 10@ 6@ 7@ 8@ 9@ 0AB1: call_scm_func @NONAME_1247 2 $PLAYER_ACTOR 25 0@ 1@ 2@ 00D6: if 06BD:   no_obstacles_between 0@ 1@ 2@ and 3@ 4@ 5@ solid 1 car 1 actor 1 object 1 particle 0 004D: jump_if_false @NONAME_911 0087: 6@ = 3@ // (float) 0087: 7@ = 4@ // (float) 0087: 8@ = 5@ // (float) :NONAME_9110AB2: ret 3 6@ 7@ 8@ :NONAME_92500D6: if 8039:   not  11@ == 0 004D: jump_if_false @NONAME_957 0A8C: write_memory 12045672 size 4 value 11@ virtual_protect 0 :NONAME_9570A9F: 26@ = current_thread_pointer 0AB1: call_scm_func @NONAME_1315 2 26@ 0 16@ 0AB1: call_scm_func @NONAME_1315 2 26@ 3 17@ 0AB1: call_scm_func @NONAME_1315 2 26@ 12 18@ 0AB1: call_scm_func @NONAME_1315 2 26@ 15 19@ 0AA7: call_function 5683712 12 pop 12 0 0 0 10@ 9@ 8@ 7@ 6@ 19@ 18@ 17@ 16@ 20@  00D6: if 8039:   not  11@ == 0 004D: jump_if_false @NONAME_1113 0A8C: write_memory 12045672 size 4 value 0 virtual_protect 0 :NONAME_11130AB1: call_scm_func @NONAME_1315 2 26@ 21 24@ 00D6: if 8039:   not  20@ == 0 004D: jump_if_false @NONAME_1220 00D6: if and8043:   not  12@ == 0.0 8043:   not  13@ == 0.0 8043:   not  14@ == 0.0 004D: jump_if_false @NONAME_1213 050A: 15@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 12@ 13@ 14@ :NONAME_12130002: jump @NONAME_1230 :NONAME_12200007: 15@ = 0.0 :NONAME_12300AB2: ret 4 12@ 13@ 14@ 15@ :NONAME_12470A96: 0@ = actor 0@ struct 0A9F: 6@ = current_thread_pointer 0AB1: call_scm_func @NONAME_1315 2 6@ 2 5@ 0AA6: call_method 6177408 0@ num_params 3 pop 0 1 1@ 5@  0AB2: ret 3 2@ 3@ 4@ :NONAME_131500D6: if 8039:   not  0@ == 0 004D: jump_if_false @NONAME_1408 0012: 1@ *= 4 0A8E: 2@ = 0@ + 220 // int 00D6: if 0039:   2@ == 1 004D: jump_if_false @NONAME_1386 000A: 1@ += 10783072 0002: jump @NONAME_1401 :NONAME_1386005A: 1@ += 0@ // (int) 000A: 1@ += 60 :NONAME_14010002: jump @NONAME_1415 :NONAME_14080006: 1@ = 0 :NONAME_14150AB2: ret 1 1@ :NONAME_142300A5: 2@ = create_car #PONY at 7@ 8@ 9@ 0338: set_car 2@ visibility 0 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -1.5 0.423 -1.22 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.4 0.4221 -1.23 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -1.4 0.14221 -2.23 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.6 0.1342221 -2.123 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.1 -0.2344 0.2324 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 0001: wait 5 ms 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset 0.0 0.0 0.0 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 0001: wait 5 ms 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -1.5 0.423 -1.22 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.4 0.4221 -1.23 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -1.4 0.14221 -2.23 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.6 0.1342221 -2.123 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset -2.1 -0.2344 0.2324 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 0001: wait 5 ms 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0407: store_coords_to 8@ 9@ 15@ from_car 5@ with_offset 0.0 0.0 0.0 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 0001: wait 5 ms 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0001: wait 5 ms 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 058A: create_gun_flash_from 14@ 19@ 30@ to 8@ 9@ 15@ 06BC: create_M4_shoot_from 14@ 19@ 30@ target 8@ 9@ 15@ energy 1000 08EB: create_sparks_at 8@ 9@ 15@ velocity_direction 0.0 0.0 1.0 density 1 0002: jump @NONAME_438 00D6: if 0119:   car 1@ wrecked 0164: disable_marker 2@ 0249: release_model #CELLPHONE 00A6: destroy_car 1@ 01C3: remove_references_to_car 1@ // Like turning a car into any random car 0002: jump @NONAME_2 hex00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00end0ABA: end_custom_thread_named 'C2.cs'

 

 

Thanks for all Replies. cookie.gif

Link to comment
Share on other sites

STOP RECOMPILING YOUR CODE. It helps you get more replies (help us help you, please). I'd also probably be able to offer suggestions to how you could improve your coding to reduce bugs and increase readability if you posted what you originally wrote.

 

I'm gonna experiment with a more easy to follow posting style because I will, no doubt, create a really long post.

 

Problem

 

0A92: create_custom_thread "C2.cs"

 

 

  1. I highly doubt you require 2 scripts. Most CLEO mods that use more than one script running at a time (I delete straight away and) could have been made with only 1 script with proper coding and planning. Making code run in a constant loop is a good idea.
  2. C2.cs already runs automatically.

Problem

 

038B: load_requested_models

 

 

:NONAME_770001: wait 0 ms0248:   model #ANDROM available0248:   model #CELLPHONE available0248:   model #ARMY available004D: jump_if_false @NONAME_77

 

 

  1. 038B removes the need to check if the models are available. It'd be best to use one or the other. You don't have to (if you wanna be as clumsy as R*N's coding team), but it's really impractical.
  2. You forgot to put if and - it's required for more than one condition.

Problem

 

04D2: set_plane 1@ fly_autopilot_around_point 16@ 17@ 18@ altitude_between 600.0 and 600.00710: plane 1@ follow_actor $PLAYER_ACTOR follow_car -1 radius 600.0

 

 

I'd think only one would be needed wink.gif

 

WTF?

And because you messed up the source so much by recompiling, I can't help with the rest. But I'd delete the code from :NONAME_438 down and start again. Or just start the whole script again tounge2.gif

Link to comment
Share on other sites

Use this to get the laser point and the entity it is colliding with:

 

 

{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'MUNDOVMT' :inicioScript0001: wait 0 ms 00D6: if and0256:   player $PLAYER_CHAR defined 056D:   actor $PLAYER_ACTOR defined 004D: jump_if_false @inicioScriptif0ADC: test_cheat "MUNDOVMT"jf @inicioScript:script00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@ 0AB1: call_scm_func @getAimPoint 4 range 1000.0 from 0@ 1@ 2@ camera_to 3@ 4@ 5@ point_to 6@ 7@ 8@ 0AB1: call_scm_func @getCollisionBetweenPoints 17 from 3@ 4@ 5@ to 6@ 7@ 8@ solid 1 car 1 actor 1 object 1 particle 1 cartyre 1 water 1 ignore_entity 0x0 see_through 0 camera_objects 0 shoot_through 0 store_to 9@ 10@ 11@ distance_to 12@ entity_to 13@ 04D5: create_corona_at 9@ 10@ 11@ radius 0.05 type 0 flare 0 RGB 255 0 0if   13@ <> 0x0then   0A8D: 14@ = read_memory 13@ size 4 virtual_protect 0 //14@ = VMT   0AD1: show_formatted_text_highpriority "Distancia: %.6g Direccion: 0x%.4X VMT: 0x%.4X" time 100 12@ 13@ 14@else   12@ = 1000.0   14@ = 0x0   0AD1: show_formatted_text_highpriority "Distancia: %.6g Direccion: 0x%.1X VMT: 0x%.1X" time 100 12@ 13@ 14@end:finalScript0001: wait 0 ms 00D6: if or8256:   not player $PLAYER_CHAR defined 856D:   not actor $PLAYER_ACTOR defined0ADC: test_cheat "MUNDOVMT" jf @script//0aca: "Mundo VMT reiniciado"jump @inicioScript//----- Funciones//-----getAimPoint:getAimPoint{Parameters:  Passed:    0@ - aiming range    1@ - start point X    2@ - start point Y    3@ - start point Z  Result:    4@ - camera point X    5@ - camera point Y    6@ - camera point Z    7@ - aim point X    8@ - aim point Y    9@ - aim point ZExample:  0AB1: call_scm_func @getAimPoint 4 range 20.0 from 0.0 0.0 0.0 camera_to 1@ 2@ 3@ point_to 4@ 5@ 6@ }0A9F: 12@ = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread 12@ var 4 store_to 10@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 12@ var 7 store_to 11@ 0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 pPoint 11@ pCamera 10@ fOriginZ 3@ fOriginY 2@ fOriginX 1@ fRange 0@ // CCamera__Find3rdPersonCamTargetVector0AB2: ret 6 4@ 5@ 6@ 7@ 8@ 9@ //-----getCollisionBetweenPoints:getCollisionBetweenPoints{Parameters:  Passed:    0@ - start point X    1@ - start point Y    2@ - start point Z    3@ - end point X    4@ - end point Y    5@ - end point Z    6@ - is solid    7@ - is car    8@ - is actor    9@ - is object    10@ - is particle    11@ - is car tyre    12@ - is water    13@ - entity to ignore (offset)    14@ - no see-through stuff    15@ - no camera objects    16@ - no shoot-through stuff  Result:    17@ - collision point X    18@ - collision point Y    19@ - collision point Z    20@ - distance    21@ - entityExample:  0AB1: call_scm_func @getCollisionBetweenPoints 17 from 0.0 0.0 0.0 to 1.0 0.0 0.0 solid 0 car 1 actor 0 object 0 particle 0 cartyre 1 water 0 ignore_entity 0x0 see_through 0 camera_objects 0 shoot_through 0 store_to 1@ 2@ 3@ distance_to 4@ entity_to 5@ }if 13@ <> 0x0 then0A8C: write_memory 0xB7CD68 size 4 value 13@ virtual_protect 0 end0A8C: write_memory 0xB7CD70 size 1 value 11@ virtual_protect 0 0A9F: 26@ = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 0 store_to 22@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 3 store_to 23@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 17 store_to 24@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 21 store_to 25@ 0AA7: call_function 0x56BA00 num_params 12 pop 12 bIgnoreShootThroughStuff 16@ bIgnoreSomeObjectsForCamera 15@ bIgnoreSeeThroughStuff 14@ bDummy 10@ bObject 9@ bActor 8@ bCar 7@ bBuilding 6@ pEntity 25@ pPoint 24@ pTarget 23@ pOrigin 22@ bReturn 31@ // CWorld__ProcessLineOfSightif 13@ <> 0x0 then0A8C: write_memory 0xB7CD68 size 4 value 0x0 virtual_protect 0 endif 31@ <> 0 thenif and  17@ <> 0.0   18@ <> 0.0   19@ <> 0.0 then  050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 17@ 18@ 19@   if     12@ == 1   then    0A9F: 26@ = current_thread_pointer    0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 27 store_to 30@     0AA7: call_function 0x6E61B0 num_params 7 pop 7 pPoint 30@ fTargetZ 5@ fTargetY 4@ fTargetX 3@ fOriginZ 2@ fOriginY 1@ fOriginX 0@ bResult 31@ // CWorld__TestLineAgainstWater    if       31@ <> 0      then      0087: 17@ = 27@       0087: 18@ = 28@       0087: 19@ = 29@       050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 27@ 28@ 29@     end  end  0AB2: ret 5 17@ 18@ 19@ 20@ 21@ endend0AB2: ret 5 3@ 4@ 5@ 0.0 0x0 //-----getLocalVarOffsetCollisionMode:getLocalVarOffset{Parameters:  Passed:    0@ - thread pointer    1@ - var number  Result:    1@ - var valueExample:  0AB1: call_scm_func @getLocalVarOffset 2 thread 0@ var 0 store_to 1@ }if 0@ <> 0 then1@ *= 0x4 0A8E: 2@ = 0@ + 0xDC // mission flagif   2@ == 1 then  1@ += 0xA48960 // mission localselse  005A: 1@ += 0@   1@ += 0x3C endelse1@ = 0 end0AB2: ret 1 1@ 

 

 

And this to check if the returned VMT matches with any type, for handling it later:

 

 

0@ = VMT_You_Got0@ /= 0x10000B14: 1@ = 0@ MOD 0x1000if or1@ == 0x871 //Base VMTs of vehicle structures1@ == 0x872 //Base VMTs of trains/boatsthen0AEB: 2@= car_struct 3@ handle //3@ = the address of the entity your pointer collided with NOT the VMT.end

 

 

good luck... smile.gif

Link to comment
Share on other sites

STOP RECOMPILING YOUR CODE. It helps you get more replies (help us help you, please). I'd also probably be able to offer suggestions to how you could improve your coding to reduce bugs and increase readability if you posted what you originally wrote.

 

I'm gonna experiment with a more easy to follow posting style because I will, no doubt, create a really long post.

 

Problem

 

0A92: create_custom_thread "C2.cs"

 

  1. I highly doubt you require 2 scripts. Most CLEO mods that use more than one script running at a time (I delete straight away and) could have been made with only 1 script with proper coding and planning. Making code run in a constant loop is a good idea.
  2. C2.cs already runs automatically.
Problem

 

038B: load_requested_models

 

 

:NONAME_770001: wait 0 ms0248:   model #ANDROM available0248:   model #CELLPHONE available0248:   model #ARMY available004D: jump_if_false @NONAME_77

 

  1. 038B removes the need to check if the models are available. It'd be best to use one or the other. You don't have to (if you wanna be as clumsy as R*N's coding team), but it's really impractical.
  2. You forgot to put if and - it's required for more than one condition.
Problem

 

04D2: set_plane 1@ fly_autopilot_around_point 16@ 17@ 18@ altitude_between 600.0 and 600.00710: plane 1@ follow_actor $PLAYER_ACTOR follow_car -1 radius 600.0

 

 

I'd think only one would be needed wink.gif

 

WTF?

And because you messed up the source so much by recompiling, I can't help with the rest. But I'd delete the code from :NONAME_438 down and start again. Or just start the whole script again tounge2.gif

AWESOME ,Deji eat cookies cookie.gifcookie.gifcookie.gifcookie.gif

Link to comment
Share on other sites

Use this to get the laser point and the entity it is colliding with:

 

 

{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'MUNDOVMT' :inicioScript0001: wait 0 ms 00D6: if and0256:   player $PLAYER_CHAR defined 056D:   actor $PLAYER_ACTOR defined 004D: jump_if_false @inicioScriptif0ADC: test_cheat "MUNDOVMT"jf @inicioScript:script00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@ 0AB1: call_scm_func @getAimPoint 4 range 1000.0 from 0@ 1@ 2@ camera_to 3@ 4@ 5@ point_to 6@ 7@ 8@ 0AB1: call_scm_func @getCollisionBetweenPoints 17 from 3@ 4@ 5@ to 6@ 7@ 8@ solid 1 car 1 actor 1 object 1 particle 1 cartyre 1 water 1 ignore_entity 0x0 see_through 0 camera_objects 0 shoot_through 0 store_to 9@ 10@ 11@ distance_to 12@ entity_to 13@ 04D5: create_corona_at 9@ 10@ 11@ radius 0.05 type 0 flare 0 RGB 255 0 0if   13@ <> 0x0then   0A8D: 14@ = read_memory 13@ size 4 virtual_protect 0 //14@ = VMT   0AD1: show_formatted_text_highpriority "Distancia: %.6g Direccion: 0x%.4X VMT: 0x%.4X" time 100 12@ 13@ 14@else   12@ = 1000.0   14@ = 0x0   0AD1: show_formatted_text_highpriority "Distancia: %.6g Direccion: 0x%.1X VMT: 0x%.1X" time 100 12@ 13@ 14@end:finalScript0001: wait 0 ms 00D6: if or8256:   not player $PLAYER_CHAR defined 856D:   not actor $PLAYER_ACTOR defined0ADC: test_cheat "MUNDOVMT" jf @script//0aca: "Mundo VMT reiniciado"jump @inicioScript//----- Funciones//-----getAimPoint:getAimPoint{Parameters:  Passed:    0@ - aiming range    1@ - start point X    2@ - start point Y    3@ - start point Z  Result:    4@ - camera point X    5@ - camera point Y    6@ - camera point Z    7@ - aim point X    8@ - aim point Y    9@ - aim point ZExample:  0AB1: call_scm_func @getAimPoint 4 range 20.0 from 0.0 0.0 0.0 camera_to 1@ 2@ 3@ point_to 4@ 5@ 6@ }0A9F: 12@ = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread 12@ var 4 store_to 10@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 12@ var 7 store_to 11@ 0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 pPoint 11@ pCamera 10@ fOriginZ 3@ fOriginY 2@ fOriginX 1@ fRange 0@ // CCamera__Find3rdPersonCamTargetVector0AB2: ret 6 4@ 5@ 6@ 7@ 8@ 9@ //-----getCollisionBetweenPoints:getCollisionBetweenPoints{Parameters:  Passed:    0@ - start point X    1@ - start point Y    2@ - start point Z    3@ - end point X    4@ - end point Y    5@ - end point Z    6@ - is solid    7@ - is car    8@ - is actor    9@ - is object    10@ - is particle    11@ - is car tyre    12@ - is water    13@ - entity to ignore (offset)    14@ - no see-through stuff    15@ - no camera objects    16@ - no shoot-through stuff  Result:    17@ - collision point X    18@ - collision point Y    19@ - collision point Z    20@ - distance    21@ - entityExample:  0AB1: call_scm_func @getCollisionBetweenPoints 17 from 0.0 0.0 0.0 to 1.0 0.0 0.0 solid 0 car 1 actor 0 object 0 particle 0 cartyre 1 water 0 ignore_entity 0x0 see_through 0 camera_objects 0 shoot_through 0 store_to 1@ 2@ 3@ distance_to 4@ entity_to 5@ }if 13@ <> 0x0 then0A8C: write_memory 0xB7CD68 size 4 value 13@ virtual_protect 0 end0A8C: write_memory 0xB7CD70 size 1 value 11@ virtual_protect 0 0A9F: 26@ = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 0 store_to 22@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 3 store_to 23@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 17 store_to 24@ 0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 21 store_to 25@ 0AA7: call_function 0x56BA00 num_params 12 pop 12 bIgnoreShootThroughStuff 16@ bIgnoreSomeObjectsForCamera 15@ bIgnoreSeeThroughStuff 14@ bDummy 10@ bObject 9@ bActor 8@ bCar 7@ bBuilding 6@ pEntity 25@ pPoint 24@ pTarget 23@ pOrigin 22@ bReturn 31@ // CWorld__ProcessLineOfSightif 13@ <> 0x0 then0A8C: write_memory 0xB7CD68 size 4 value 0x0 virtual_protect 0 endif 31@ <> 0 thenif and  17@ <> 0.0   18@ <> 0.0   19@ <> 0.0 then  050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 17@ 18@ 19@   if     12@ == 1   then    0A9F: 26@ = current_thread_pointer    0AB1: call_scm_func @getLocalVarOffset 2 thread 26@ var 27 store_to 30@     0AA7: call_function 0x6E61B0 num_params 7 pop 7 pPoint 30@ fTargetZ 5@ fTargetY 4@ fTargetX 3@ fOriginZ 2@ fOriginY 1@ fOriginX 0@ bResult 31@ // CWorld__TestLineAgainstWater    if       31@ <> 0      then      0087: 17@ = 27@       0087: 18@ = 28@       0087: 19@ = 29@       050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 27@ 28@ 29@     end  end  0AB2: ret 5 17@ 18@ 19@ 20@ 21@ endend0AB2: ret 5 3@ 4@ 5@ 0.0 0x0 //-----getLocalVarOffsetCollisionMode:getLocalVarOffset{Parameters:  Passed:    0@ - thread pointer    1@ - var number  Result:    1@ - var valueExample:  0AB1: call_scm_func @getLocalVarOffset 2 thread 0@ var 0 store_to 1@ }if 0@ <> 0 then1@ *= 0x4 0A8E: 2@ = 0@ + 0xDC // mission flagif   2@ == 1 then  1@ += 0xA48960 // mission localselse  005A: 1@ += 0@   1@ += 0x3C endelse1@ = 0 end0AB2: ret 1 1@ 

 

 

And this to check if the returned VMT matches with any type, for handling it later:

 

 

0@ = VMT_You_Got0@ /= 0x10000B14: 1@ = 0@ MOD 0x1000if or1@ == 0x871 //Base VMTs of vehicle structures1@ == 0x872 //Base VMTs of trains/boatsthen0AEB: 2@= car_struct 3@ handle //3@ = the address of the entity your pointer collided with NOT the VMT.end

 

 

good luck... smile.gif

Great laser aimer is work !!!

get cookies cookie.gifcookie.gifcookie.gifcookie.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.