Raised This Month: $32 Target: $400
 8% 

Solved How to hook molotov touch (explosion)?


Post New Thread Reply   
 
Thread Tools Display Modes
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-22-2019 , 10:34   Re: How to hook molotov touch (explosion)?
Reply With Quote #11

MasterMind420, thank you. Your method is also work.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
XiLuo
Member
Join Date: Mar 2018
Old 02-22-2019 , 10:46   Re: How to hook molotov touch (explosion)?
Reply With Quote #12

forward OnEntityDestroyed(entity) for "pipe_bomb_projectile" is useful to what you need?
XiLuo is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-22-2019 , 10:46   Re: How to hook molotov touch (explosion)?
Reply With Quote #13

MasterMind420, however, "m_hOwnerEntity" property of "molotov_projectile" at that moment of time is already invalidated, so I can't use this method, because, I also need an owner for my further plugin logic.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
XiLuo
Member
Join Date: Mar 2018
Old 02-22-2019 , 10:52   Re: How to hook molotov touch (explosion)?
Reply With Quote #14

the event:
molotov_thrown
Note:
Name:molotov_thrown
Structure: short userid

It can get the user who has thrown molotov
XiLuo is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 02-22-2019 , 10:58   Re: How to hook molotov touch (explosion)?
Reply With Quote #15

XiLuo, I have no problems with getting the owner of molotov at the beginning of throwing.
We are considering the moment of explosion in this topic.
BTW, my game has no "molotov_thrown" event.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 02-22-2019 , 11:09   Re: How to hook molotov touch (explosion)?
Reply With Quote #16

Quote:
Originally Posted by Dragokas View Post
MasterMind420, however, "m_hOwnerEntity" property of "molotov_projectile" at that moment of time is already invalidated, so I can't use this method, because, I also need an owner for my further plugin logic.
You could use spawn post and an array to store the entity and the owner of said entity, after doing what u need just clear the array However i still think lux's method would be easier and less code.
I've done lots of work with arrays and storing specific entities, there owners...it's possible to do.

Last edited by MasterMind420; 02-22-2019 at 11:13.
MasterMind420 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 02-22-2019 , 11:13   Re: How to hook molotov touch (explosion)?
Reply With Quote #17

Quote:
Originally Posted by XiLuo View Post
the event:
molotov_thrown
Note:
Name:molotov_thrown
Structure: short userid

It can get the user who has thrown molotov
Molotov Thrown event is garbage...i've tried using it in the past and gotten mixed results. if it even works at all. It's better in most cases to not use events if u don't have to.
MasterMind420 is offline
quasemago
Senior Member
Join Date: Dec 2018
Location: Brazil
Old 02-22-2019 , 12:24   Re: How to hook molotov touch (explosion)?
Reply With Quote #18

Quote:
Originally Posted by Dragokas View Post
quasemago, thanks, unfortunately, no "inferno_startburn" event for my game.
Sorry, I thought it was for csgo.
quasemago is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 02-22-2019 , 22:07   Re: How to hook molotov touch (explosion)?
Reply With Quote #19

Another option to detect Molotov breaking is

PHP Code:
CMolotovProjectile::Detonate(CMolotovProjectile *this)

_ZN18CMolotovProjectile8DetonateEv 
The signature looks the same between l4d1 and l4d2

Hook this function with dhooks this will be the best in terms of accuracy

I'm not sure how to get signatures in windows makes my brain hurt.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
XiLuo
Member
Join Date: Mar 2018
Old 02-23-2019 , 00:50   Re: How to hook molotov touch (explosion)?
Reply With Quote #20

Sorry,my fault,I didn't review the topic properly.
SDKHook_StartTouch/Touch CallBack:OnTouch(int entity, int other)
parameter entity:entity which is hooked
other:which entity touched(the value zero is that map building(not game entity) touch it,or is Car alarm,player,entity car(is not map building)),and other game entities
sorry for my poor English
XiLuo is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode