Raised This Month: $51 Target: $400
 12% 

Monster damage event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-07-2007 , 18:00   Monster damage event
Reply With Quote #1

How can I know in sven-coop when a monster has taken damage, how much damage was it, and who was the attacker?


I was able to find this:
http://forums.alliedmods.net/showpos...59&postcount=4

But i was not able to put it to work :/



Edit:
Never mind, i just found out that mr. sawce had put a updated version of his module on the middle of the post
__________________
http://www.nican132.com
I require reputation!

Last edited by Nican; 04-07-2007 at 18:02.
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-07-2007 , 19:29   Re: Monster damage event
Reply With Quote #2

I still need help

I did
PHP Code:
public plugin_init(){
register_takedamage("monster_alien_slave","hook_takedamage");
}

public 
hook_takedamage(idHostage,idInflictor,idAttacker,Float:damage,type)
{
    
client_print(0,print_chat,"idHostage = %i | idInflictor = %i | idAttacker = %i | damage = %f | type = %i",idHostage,idInflictor,idAttacker,damage,type)
    return 
HAM_IGNORED;

And everytime i see (not even attack) a alien_slave the server crashes
__________________
http://www.nican132.com
I require reputation!

Last edited by Nican; 04-07-2007 at 19:32.
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-08-2007 , 11:52   Re: Monster damage event
Reply With Quote #3

Can someone please help me?
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-08-2007 , 12:36   Re: Monster damage event
Reply With Quote #4

Do you have 64 bit?
Note: No 64 bit support. 64 bit can go to hell.
...
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-08-2007 , 13:46   Re: Monster damage event
Reply With Quote #5

Dang D:
The only 32bit computer i hate is running linux
and sven-coop does not support linux D:

Thank you
+karma
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-08-2007 , 14:04   Re: Monster damage event
Reply With Quote #6

Thanks - Hey, it says my Karma is "Good" - stylish ^^
If the devs at sc are wise, linux will be supported in 3.5,
but i am not sure if so. If this module would work with 64 bit, too,
then it would be very cool, because I could make additional damage
skill and resistances in SCXPM 20.0 without seeing people crying it
is not working, including myself with my new pc. ^^" You sure know
SCXPM if u play svencoop - Im teh author. ^^ btw how is your enting
community going?
__________________
EAT YOUR VEGGIES
Silencer123 is offline
|POW|Da_ghost
Senior Member
Join Date: Nov 2006
Location: http://snarkcafe.net
Old 04-08-2007 , 15:42   Re: Monster damage event
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=46712
__________________
If you want me to help you with something please contact me on msn or xfire(Daghost1337)
|POW|Da_ghost is offline
Send a message via AIM to |POW|Da_ghost Send a message via MSN to |POW|Da_ghost
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-08-2007 , 16:52   Re: Monster damage event
Reply With Quote #8

Um... I get a undefined symbol "register_takedamage"
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 04-08-2007 , 18:53   Re: Monster damage event
Reply With Quote #9

Try using hs_takedamage instead of register_takedamage

If that doesn't work, try this.

__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-08-2007 , 21:30   Re: Monster damage event
Reply With Quote #10

hs_takedamage is a native...

Quote:
/**
* Calls the mod's private damage routine.
* -
* parameters:
* id: index of the entity that is to be damaged
*
* inflictor: the entity that is "doing the damage" (eg a weapon)
*
* attacker: the entity who controls the inflictor (eg weapon holder)
*
* damage: how much damage to do to the victim
*
* type: bitmask of damage flags. Most mods do not
* follow the standard HLSDK damage flags, so
* you may have to do some testing!
* The only flags I figured out were CS related:
* * (1<<6) = no slowdown on damage
* * (1<<13) = always gib
* * (1<<12) = never gib
*
* -
* Note: Setting damage to a ridiculously high value can mess up
* some mods!
*/
native hs_takedamage(id,inflictor,attacker,Float:dam age,type);
Well.. i will just have to live with my generic function :/

Thank you anyway
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
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 05:05.


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