Bad.boy! Posted February 10, 2012 Share Posted February 10, 2012 I want to get a ped who shoots at CJ, but I can't find a way to do this. 051A, works only if you created the actor who shoot at CJ. I also tried in C#, with NTAuthority's plugin, but I can't get the handle there either: using System;using System.Collections.Generic;using System.Linq;using System.Text;using GTA;using GTA.Internal;namespace First_script{ public class FS : TickScript { public FS() { Interval = 250; Tick += new EventHandler(FS_Tick); } void FS_Tick(object sender, EventArgs e) { if (myPed == null) { Cheats.RegisterCheat("payback", cheat_BB); } } Ped myPed = null; public void cheat_BB() { if (Player.CanControlCharacter == true) { if (Player.Character.IsDriving == true) { } else { var targetPeds = World.GetAllPeds(); Player.Character.DamagedBy() //For weapon, actor or car } } } }} Link to comment Share on other sites More sharing options...
DK22Pac Posted February 10, 2012 Share Posted February 10, 2012 (edited) Only with scm created? {$CLEO}0000:while true wait 0 if actor.Defined($3) then actor.StorePos($3, [email protected], [email protected], [email protected]) if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 200.0 find_next false pass_deads true then repeat if 051A: actor $3 damaged_by_actor [email protected] then // [email protected] has handle of this ped actor.StorePos([email protected], [email protected], [email protected], [email protected]) 016F: create_shadow 3 rotation 0.0 size 1.5 intensity 1 RGB 255 0 0 at [email protected] [email protected] [email protected] end until 8AE1: not [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 200.0 find_next true pass_deads true end endend And also I think that this actor stored somewhere in CPed struct, just look how this opcode (051A) get it. Edit {$CLEO}0000:while true wait 0 if actor.Defined($3) then 0A96: [email protected] = actor $3 struct [email protected] += 0x764 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if [email protected] > 0 then 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if or [email protected] == 0x86C358 [email protected] == 0x86C0A8 [email protected] == 0x86C120 [email protected] == 0x86C200 then 0AEA: [email protected] = actor_struct [email protected] handle actor.StorePos([email protected], [email protected], [email protected], [email protected]) 016F: create_shadow 3 rotation 0.0 size 1.5 intensity 1 RGB 255 0 0 at [email protected] [email protected] [email protected] end end endend Edited February 10, 2012 by DK22Pac Link to comment Share on other sites More sharing options...
Bad.boy! Posted February 10, 2012 Author Share Posted February 10, 2012 Thanks for the help. I was wondering for a long time how to get that. And for people who are interested this is how to get it in c#: var Peds = from ped in World.GetAllPeds() where (Player.Character.DamagedBy(ped) == true) select ped; foreach (var ped in Peds) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now