[HELP] Getting details about who killed and dead. using Hamsandwich lib.
Hey everybody,
Before i start with my question, i wanna say SORRY about my English.. It's now me it's the English teachers in my country ;-) So, i heard about Hamsandwich, and i want to make a plugin that doing something after some one killed. I so in one of the plugins here, that someone used HamSandwich there, Something like this: PHP Code:
1. What the third parameter in the death_func function says? (I have problem on my server so i couldn't check it alone) 2. How can i get the id of the Killer? And one more thing, If i want to write each time in the server memory when some one killed somebody, how would i save it if i want to save more then one parameter? I mean, i want to make something like a table: PHP Code:
How can i check if the death is an headshot? Thanks, Elad. |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
1. it tells you if player should explode into gibs or not.
2. In you example ; szKiller. Which should be Killer. |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
You mean the ID of the killer?
(btw thanks alot) and some one know about 3rd and 4th question? |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
Yep.
4. About the headshot, 2 easy ways are : - if using Ham, you can check the offset 75 (m_LastHitGroup) ; something like : if ( get_pdata_int( id, 75 ) == HIT_HEAD ) - Using the DeathMsg event instead of ham, and cheking the third param. |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
thanks.
sorry that I anoyne, My last question, How can i know wich weapon the killer used? |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
You can use get_user_attacker().
Code:
new WeaponId, HitZone;HitZone will give you the last zone which has killed the player, like m_LastHitGroup. ( HIT_* ; see amxconst.inc ) If you use the DeathMsg Event, the killer's weapon name is passed into the fourth param. If you need the weapon id, you can use get_weaonid(). |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
ok thank you alot!
I appraise you'r help! |
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
Actually, you can use get_user_weapon( Killer ) if you need only to know the weaponid used.
|
Re: [HELP] Getting details about who killed and dead. using Hamsandwich lib.
The killer id is an integer so you shouldn't use "sz" as this indicates a zero-terminated string; for clarity.
|
| All times are GMT -4. The time now is 17:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.