View Single Post
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 07-24-2019 , 21:45   Re: Deathnotice custom icon
Reply With Quote #6

This may help to point you in the right direction since it alters the killfeed.

It's code taken from Leonardo's Be the Eye plugin.


Code:
public Action:OnPlayerDeath( Handle:hEvent, const String:strEventName[], bool:bDontBroadcast )
{
	new iClient = GetClientOfUserId( GetEventInt( hEvent, "userid" ) );
	if( !IsValidClient(iClient) )
		return Plugin_Continue;
	
	if( bEyeStatus[iClient] )
	{
		DontBeTheMonoculus( iClient );
		return Plugin_Continue;
	}
	
	new iKiller = GetClientOfUserId( GetEventInt( hEvent, "attacker" ) );
	if( !IsValidClient(iKiller) || !bEyeStatus[iKiller] )
		return Plugin_Continue;
	
	SetEventString( hEvent, "weapon", "eyeball_rocket" );
	SetEventInt( hEvent, "weaponid", 0 );
	SetEventString( hEvent, "weapon_logclassname", "eyeball_rocket" );
	SetEventInt( hEvent, "customkill", TF_CUSTOM_EYEBALL_ROCKET );
	
	SetEntityHealth( iKiller, GetClientHealth(iKiller) + iEyeHPP );
	return Plugin_Continue;
}
PC Gamer is offline