Quantcast

Jump to content

» «
Photo

[Q] Get player's target object/ped?

3 replies to this topic
Hergonan
  • Hergonan

    Prankster

  • Members
  • Joined: 31 Aug 2005

#1

Posted 14 January 2009 - 06:44 PM

How do I get player's current target?
Do I somehow cycle through all the peds in memory then use IsPlayerTargettingChar ?

L0uNGeR
  • L0uNGeR

    Ya, that's what I said.

  • Members
  • Joined: 03 Dec 2008

#2

Posted 14 January 2009 - 07:00 PM Edited by L0uNGeR, 14 January 2009 - 07:36 PM.

QUOTE (Hergonan @ Jan 14 2009, 19:44)
Do I somehow cycle through all the peds in memory ....... ?

I don't think that's possible, or at least not at the moment.
The only possible way I see at the moment is by using

- GetClosestChar()
- IsPlayerFreeAimingAtChar()
- IsPlayerTargettingAnything()
- IsPlayerTargettingChar()

L0uNGeR
  • L0uNGeR

    Ya, that's what I said.

  • Members
  • Joined: 03 Dec 2008

#3

Posted 14 January 2009 - 07:35 PM

omg doublepost

Hergonan
  • Hergonan

    Prankster

  • Members
  • Joined: 31 Aug 2005

#4

Posted 15 January 2009 - 10:54 AM

Hmm what about reading the memory?
For example, start reading from pedoffset and for each ped check if the player is targeting it.
(I didn't check how peds are stored in memory yet, but it shouldn't be that hard to find:P)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users