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

Pls help me~ How to damage player in module?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1023168216
Member
Join Date: Jun 2013
Location: Tokyo
Old 08-16-2014 , 02:03   Pls help me~ How to damage player in module?
Reply With Quote #1

I m just coding the NPC source, but i dont know how to make the NPC damage player...

is there any reference?

i try to read the hamsandwich source to see how it work " ExecuteHamB(Ham_TakeDamage, ...)"
But i cannot understand how it work, it is too difficult for me ~>_<~+

Can anyone help me? please~

Thank you ~~
1023168216 is offline
1023168216
Member
Join Date: Jun 2013
Location: Tokyo
Old 08-16-2014 , 02:05   Re: Pls help me~ How to damage player in module?
Reply With Quote #2

And i ve tried to find the Monster Mod source( i think it may help me a lot )
but no found ...

Anyone have it ???
Can anyone send me one ? at my email : [email protected]
thank u ~ o(∩_∩)o
1023168216 is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 08-16-2014 , 03:27   Re: Pls help me~ How to damage player in module?
Reply With Quote #3

Look code from https://svn.aghl.ru:8443/svn/HLModules/weaponmod/trunk

-->

https://svn.aghl.ru:8443/svn/HLModul...wpnmod_hooks.h

-->

PHP Code:
        inline int TAKE_DAMAGE(edict_tpentVictimedict_tpentInflictoredict_tpentAttackerfloat damageint bitsDamageType)
        {
            return 
reinterpret_cast<FuncTakeDamage>(GET_VTABLE_ENT(pentVictim)[GET_VTABLE_OFFSET(VO_TakeDamage)])(pentVictim->pvPrivateDataDUMMY_VALVARS(pentInflictor), VARS(pentAttacker), damagebitsDamageType);
        } 
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
1023168216
Member
Join Date: Jun 2013
Location: Tokyo
Old 08-16-2014 , 23:42   Re: Pls help me~ How to damage player in module?
Reply With Quote #4

Quote:
Originally Posted by Bos93 View Post
Look code from https://svn.aghl.ru:8443/svn/HLModules/weaponmod/trunk

-->

https://svn.aghl.ru:8443/svn/HLModul...wpnmod_hooks.h

-->

PHP Code:
        inline int TAKE_DAMAGE(edict_tpentVictimedict_tpentInflictoredict_tpentAttackerfloat damageint bitsDamageType)
        {
            return 
reinterpret_cast<FuncTakeDamage>(GET_VTABLE_ENT(pentVictim)[GET_VTABLE_OFFSET(VO_TakeDamage)])(pentVictim->pvPrivateDataDUMMY_VALVARS(pentInflictor), VARS(pentAttacker), damagebitsDamageType);
        } 

Thank u~
But i found a more convienient way : when module need to TakeDamage , just need to make a amxx plugin to do it( by forward func )
1023168216 is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 08-17-2014 , 00:34   Re: Pls help me~ How to damage player in module?
Reply With Quote #5

Quote:
Originally Posted by 1023168216 View Post
And i ve tried to find the Monster Mod source( i think it may help me a lot )
but no found ...

Anyone have it ???
Can anyone send me one ? at my email : [email protected]
thank u ~ o(∩_∩)o

https://forums.alliedmods.net/showthread.php?t=217622
Sreaper is offline
1023168216
Member
Join Date: Jun 2013
Location: Tokyo
Old 08-17-2014 , 01:31   Re: Pls help me~ How to damage player in module?
Reply With Quote #6

Quote:
Originally Posted by Sreaper View Post
That is for CSGO... Not for CS1.6...
o(∩_∩)o
1023168216 is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 08-17-2014 , 01:41   Re: Pls help me~ How to damage player in module?
Reply With Quote #7

Quote:
Originally Posted by 1023168216 View Post
That is for CSGO... Not for CS1.6...
o(∩_∩)o
I thought you meant "I'm looking for Monster Mod (Source)" for some reason.

Last edited by Sreaper; 08-17-2014 at 01:42.
Sreaper is offline
Reply



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 13:51.


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