Quantcast

Jump to content

» «
Photo

need a KilledBy function

1 reply to this topic
giovafr
  • giovafr

    Player Hater

  • Members
  • Joined: 12 Jun 2013

#1

Posted 12 June 2013 - 01:36 PM

Greetings

i try to find a way to know who has killed a ped.
To be more specific, if a ped (not a player) kill an other one, i want to be able to know it.

Any solution?

i use scripthook.net but any solution for c++ or sco would be appreciated also.

Thanks smile.gif

julionib
  • julionib

    Coder

  • Feroci
  • Joined: 13 Sep 2012
  • Brazil

#2

Posted 12 June 2013 - 04:38 PM

QUOTE (giovafr @ Wednesday, Jun 12 2013, 13:36)
Greetings

i try to find a way to know who has killed a ped.
To be more specific, if a ped (not a player) kill an other one, i want to be able to know it.

Any solution?

i use scripthook.net but any solution for c++ or sco would be appreciated also.

Thanks smile.gif

mmm, i dont know if we have an direct way like native...("get_killer", deadPed) but you can try somethign like this:

HAS_CHAR_BEEN_DAMAGED_BY_CHAR

run the list of peds, get the dead ones, then for each dead you run the list of peds and use the method to see who did last damage to the dead ped

also its interesting have a list of dead and processed peds to avoid reprocess



*its one idea, i didnt tested and im not sure if the method will treat always last ped that caused damage or if will treat any ped that caused damage




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users