View Single Post
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-19-2021 , 08:46   Re: Whats Wrong I had Done :(
Reply With Quote #6

Replace rg_get_weaponbox_id(pevAttacker) with get_user_weapon(pevAttacker).

You should probably hook DeathMsg instead, because it may happen that the victim dies to a grenade while the attacker is holding a knife.

Quote:
Originally Posted by Bugsy View Post
I've never scripted or know anything about WC3. Do some testing for yourself to see what happens in the DeathMsg event.

DeathMsg
PHP Code:
register_event"DeathMsg" "DeathMsgEvent" "a" );

public 
DeathMsgEvent()
{
     new 
iKiller read_data);
     new 
iVictim read_data);
     new 
iIsHeadshot read_data);
     new 
szWeapon20 ]; read_dataszWeapon charsmaxszWeapon ) );
     
     
client_printprint_chat "%d %d %d %s" iKiller iVictim iIsHeadshot szWeapon );

__________________








CrazY. is offline