I want to do something like this(the photo isn't mine):
In the console it shows that the player has been killed by a hegrenade, but not in the game. It just shows a worldspawn icon which I don't want. Instead of it I want it to show a hegrenade icon.
I tried doing it with make_deathmsg but it just makes an extra deathmsg so it looks like that the player has killed the enemy two times lol
Code:
public player_death()
{
new id = read_data(2);
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
switch(us_get_zombie_class(id))
{
case CLASS_ID_BOOMER:
{
emit_sound( id, CHAN_STREAM, explode_sounds[ random_num( 0, 2 ) ], 1.0, ATTN_NORM, 0, PITCH_HIGH )
gBoom(id);
for(new i = 1; i <= 32; i++)
{
if( !is_valid_ent(i) || !is_user_alive(i) || !is_user_connected(i) || us_get_user_zombie(i) || get_entity_distance(id, i) > get_pcvar_num(cvar_boomer_explodedist))
continue;
message_begin(MSG_ONE, g_msgid_ScreenFade, _, i)
write_short(get_pcvar_num(cvar_boomer_wakeuptime))
write_short(get_pcvar_num(cvar_boomer_wakeuptime))
write_short(0x0004)
write_byte(79)
write_byte(180)
write_byte(61)
write_byte(255)
message_end()
if( get_pcvar_num( cvar_boomer_victimrender ) )
set_rendering( i, kRenderFxGlowShell, 79, 180, 61, kRenderNormal, 25 )
new iGrenade = create_entity("weapon_hegrenade");
if(pev_valid(iGrenade))
{
new Float:fDamage = get_pcvar_float(cvar_boomer_boom_damage);
ExecuteHam(Ham_TakeDamage, i, iGrenade, id, fDamage, DMG_GRENADE);
remove_entity(iGrenade);
}
set_task(get_pcvar_float(cvar_boomer_wakeuptime), "victim_wakeup", i+TASKID_WAKE_UP);
}
}
}
return PLUGIN_CONTINUE;
}
I tried to do it like this but it didn't work :s
Code:
message_begin(MSG_ONE, gmsgWeaponList, {0,0,0}, id)
write_byte(1); // status (0=hide, 1=show, 2=flash)
write_string("hegrenade"); // tried weapon_hegrenade, grenade, weapon_grenade but it didn't work
write_byte(0); // red
write_byte(255); // green
write_byte(0); // blue
message_end();