![]() ![]() |
![]() ![]() Post #1 | |
![]() Devil's Advocate ![]() Posts: 413 From: CA US Joined: 26-July 09 ![]() | I've seen some of Ryosuke's mods be able to do this but I when checking out his scripts I can't find the darn thing that makes this possible. Like I say I want to get the coordinates of the place (not ped/car/object) that CJ is targeting with a weapon or something, how would I go about accomplishing this? Urgh this stuff has me confuzzled. ![]() This post has been edited by Adler: Dec 30 2010, 05:20 AM -------------------- ![]() |
![]() Post #2 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | There's a function which processes the line of sight (0x56BA00) - unfortunately I don't know how to use this. I've always gone for a manual approach... SANNY 068D: get_camera_position_to 0@ 1@ 2@ 068E: get_camera_target_point_to 3@ 4@ 5@ 0063: 3@ -= 0@ 0063: 4@ -= 1@ 0063: 5@ -= 2@ for 6@ = 1.0 to 50.0 step 1.0 // from MinDistance to MaxDistance 005B: 0@ += 3@ 005B: 1@ += 4@ 005B: 2@ += 5@ 0087: 6@ = 0@ 0087: 7@ = 1@ 0087: 8@ = 2@ 0087: 9@ = 0@ 0087: 10@ = 1@ 0087: 11@ = 2@ 000B: 6@ += 0.5 000B: 7@ += 0.5 000B: 8@ += 0.5 000F: 9@ -= 0.5 000F: 10@ -= 0.5 000F: 11@ -= 0.5 if 0339: anything_in_cube_cornerA 8@ 9@ 10@ cornerB 6@ 7@ 8@ solid 0 car 0 actor 1 object 0 particle 0 then // this is probably the furthest point in the cameras direction break end end -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #3 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | for 6@ = 1.0 to 50.0 step 1.0 Then, it will inexact, right? Also, Seeman found some function in .exe that returns coords of targeting area. SANNY Wanted this code? GTFO SANNY Wanted this code? GTFO This post has been edited by DK22: Dec 23 2011, 12:59 AM |
![]() Post #4 | |
![]() Coding like a Rockstar! ![]() Posts: 1,468 From: ??? Joined: 28-May 09 ![]() | Ah, very nice! This could also help me, thanks. -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
![]() Post #5 | |
![]() Devil's Advocate ![]() Posts: 413 From: CA US Joined: 26-July 09 ![]() | Ooooh thanks a lot DK! This will help me a lot in future mods. ![]() EDIT Hmm the last parameter for that function... is that a fixed range from the coords you pass to the function? I tried it out by putting a corona to mark where the coords the function gives out is and it seems like the corona's always a set distance from where the player is (when passing the player's position to the function). Maybe I should incorporate the function into a for loop and check for obstacles like Deji's method did. This post has been edited by Adler: Dec 30 2010, 10:09 PM -------------------- ![]() |
![]() Post #6 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | ^^ Method by Den_spb This post has been edited by DK22: Dec 23 2011, 01:00 AM |
![]() Post #7 | |
Ameteur Member Posts: 54 Joined: 8-January 11 ![]() | |
![]() Post #8 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | Do not steal my ideas ![]() This post has been edited by DK22: Dec 23 2011, 01:00 AM |
![]() Post #9 | |
Ameteur Member Posts: 54 Joined: 8-January 11 ![]() | |
![]() Post #10 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | QUOTE What can i say, i'm a mind reader ![]() QUOTE BTW, my game freezes after actor death with this code... A problem is here: SANNY Wanted this code? GTFO This post has been edited by DK22: Dec 23 2011, 01:00 AM |
![]() Post #11 | |
Ameteur Member Posts: 38 Joined: 16-January 11 ![]() | I've been waiting for a mod like this for ages. I remember seeing on the Vol-GTA forums, that Skript had made one, but someone told me that it was buggy, and wasn't going to release it. Hopefully this will be released soon ![]() Does it also work on cars ? And custom cars ? Also, for when peds shoot as well ? |
![]() Post #12 | |
Ameteur Member Posts: 54 Joined: 8-January 11 ![]() | DK22, are you gonna release it as a mod? This post has been edited by ThirteenAG: Apr 22 2011, 05:41 PM |
![]() Post #13 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | I have updated a code. And wrote a specific code for calculating X and Z angle for object on another object) |
![]() Post #14 | |
Ameteur Member Posts: 38 Joined: 16-January 11 ![]() | I have updated a code. And wrote a specific code for calculating X and Z angle for object on another object) Are you going to release this DK22? I've wanted it ever since I found a thread on the forums @ VolGTA by Skript; who was trying to make something very similar. |
![]() Post #15 | |
Ameteur Member Posts: 54 Joined: 8-January 11 ![]() | I have another idea ![]() ![]() UPD. I made a small video - http://www.youtube.com/watch?v=greTjyedYWU This post has been edited by ThirteenAG: Apr 30 2011, 05:45 PM |
![]() Post #16 | |
![]() Member Posts: 197 From: Liberty City, Shoreside Joined: 15-July 10 ![]() | ^^ Cool idea) |
![]() ![]() |