Quantcast

Jump to content

» «
Photo

Produce explosion on vehicle impact?

4 replies to this topic
playaindahood
  • playaindahood

    Cooljunk Productions

  • Members
  • Joined: 04 Apr 2008

#1

Posted 09 April 2012 - 08:29 PM

Does anyone know of a native script I could use to make it so an explosion is produced when your car collides with a pedestrian/other player?

It seems very possible. Thanks for any help

thaCURSEDpie
  • thaCURSEDpie

    GTA:IV scripter

  • Members
  • Joined: 01 Jul 2007

#2

Posted 15 April 2012 - 02:04 PM

Considering your other posts and PMs, you're probably trying to do this on the console... But I'm just going to ignore that and explain how I'd do it (have already done it, actually):

Reverse GTAIV.exe -> find the function which gets called when a ped is hurt.
Find out who or what is causing the ped to get hurt.
Code a hook to detour the native code to your own code, then do the things needed.
Retour back to native code, so code execution can continue.

Have a look at my latest youtube vid, you can see it's working (though I don't put explosions, I play a sound upon hit).

GL.

tickHooker
  • tickHooker

    Player Hater

  • BUSTED!
  • Joined: 15 Apr 2012

#3

Posted 15 April 2012 - 08:01 PM

can you elaborate tcp?

FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#4

Posted 15 April 2012 - 08:47 PM

Take a look at this thread.

Fantaseb
  • Fantaseb

    One Nation, One Love, But Who? ;)

  • BUSTED!
  • Joined: 17 Oct 2011

#5

Posted 15 April 2012 - 10:01 PM

QUOTE (thaCURSEDpie @ Sunday, Apr 15 2012, 14:04)
Considering your other posts and PMs, you're probably trying to do this on the console... But I'm just going to ignore that and explain how I'd do it (have already done it, actually):

Reverse GTAIV.exe -> find the function which gets called when a ped is hurt.
Find out who or what is causing the ped to get hurt.
Code a hook to detour the native code to your own code, then do the things needed.
Retour back to native code, so code execution can continue.

Have a look at my latest youtube vid, you can see it's working (though I don't put explosions, I play a sound upon hit).

GL.

Well I geuss the PC modders dont know much GTA IV on Xbox 360 does not have a GTAIV.exe file like PC, scripts are not loaded that way for online use, we have a Defualt.xex and we cant mod that at all! So we use the Script_network.img and load all of our scripts from there, Xbox scripting is different from PC. If we could use the .XEX file it would be great but Jtags cant get online, so we do modding other ways.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users