Hi! I have had problems in order to do this, I use yap pug mod, I need to run the command .dmg which is that shows you the damage received, you can see all the players on the team contrary example i am CT run the command and that i am all players Terrorists because this code which makes is that you shows only players who have you done damage could help to create this? Here no longer an example in an image, And ceases my code here:
PHP Code:
public cmd_dmg(id)
{
if( is_user_alive(id) && id != 0 && !allowdmg ) pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED");
else
{
static Players[32], name[32]
new playerCount, i, player
get_players(Players, playerCount, "ch")
new tmp_hits, tmp_dmg, tmp_rhits, tmp_rdmg, check
for (i=0; i<playerCount; i++)
{
player = Players[i]
tmp_hits = pug_hits[id][player]
tmp_rhits = pug_hits[player][id]
if( tmp_hits || tmp_rhits )
{
check = 1
tmp_dmg = pug_dmg[id][player]
tmp_rdmg = pug_dmg[player][id]
if(player == id) client_print(id,print_chat,"%s %L",pug_header2,id,"PUG_AUX_DMG_SELF",tmp_dmg,tmp_hits, is_user_alive( player ) ? get_user_health(player) : 0)
else
{
get_user_name(player,name, 31)
client_print(id,print_chat,"%s %L",pug_header2,id,"PUG_AUX_DMG",tmp_dmg,tmp_hits,tmp_rdmg,tmp_rhits, name, is_user_alive( player ) ? get_user_health(player) : 0)
}
}
}
tmp_hits = pug_hits[id][0]
tmp_rhits = pug_hits[0][id]
if( tmp_hits || tmp_rhits )
{
tmp_dmg = pug_dmg[id][0]
tmp_rdmg = pug_dmg[0][id]
client_print(id,print_chat,"%s %L",pug_header2,id,"PUG_AUX_DMG","WorldSpawn",tmp_hits,tmp_dmg, is_user_alive( player ) ? get_user_health(player) : 0)
}
else if(!check) client_print(id,print_chat,"%s %L",pug_header2,id,"PUG_AUX_NODMG")
}
return PLUGIN_HANDLED
}