[CSX] Nade kill returns as knife kill
Code:
I normally use client_death but in this case I decided to use the register_event for deathmsg. Whenever a player kills another with a grenade...the weaponid returned is knife? I'm not sure if this is normal. All other weapon id's stored in the global array is returned correctly except for the nade index. |
Re: [CSX] Nade kill returns as knife kill
get_user_weapon(index,...) returns the CURRENT weapon of the player. If a player throws their HE Grenade, theyre not going to be using that weapon any more when it explodes.
The fourth paramter sent in the DeathMsg event should contain the string of the weapon kill in CS and CZ, 3rd parameter in other mods usually (not exactly sure what it would read for a grenade kill in cs). Also, this should be in scripting help :x |
Re: [CSX] Nade kill returns as knife kill
I think you are doing wrong way.
in this case "DeathMsg" don't return weapon id. olny return weapon name Code:
new wpnname[16]Code:
/* Returns id of currently carried weapon. Gets also |
Re: [CSX] Nade kill returns as knife kill
Quote:
|
Re: [CSX] Nade kill returns as knife kill
As a note: read_data(4, ...) will return "grenade". By default (without 3rd party mods) it will be always HE grenade, since kill by C4 explosion never passed through DeathMsg
|
| All times are GMT -4. The time now is 06:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.