Hey, dude, thanks a lot! It worked! I created a simple plugin to test it. It does the following: when you shoot a random shot with a deagle, you kill all the players from the opponent team with HS. There is only one thing bothering me - they all die how they should, but only one guy survives and doesn't give a f*ck about my plugin

It's not from the loop, since the 'num' returns 1 (printed it), but the trace doesn't kill the last guy. I mean, they are like 4 CTs, and when I shoot with the deagle, three of them die and the fourth just sirvives like nothing has event ment to kill him. It's strange and I can't understand what is causing that. Here is the code, I think the loops are okay and there is some special detail with the traces, that I'm missing. Some opinions?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
public plugin_init()
{
register_plugin("Insta Deagle HS", "1.0", "Flicker")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_deagle", "onPrimaryAttack", true)
}
public onPrimaryAttack(ent)
{
new id = pev(ent, pev_owner)
new iTeam = get_user_team(id)
new clip, ammo
get_user_weapon(id, clip, ammo)
if(!clip) return
new szTeam[32]
copy(szTeam, charsmax(szTeam), iTeam == 1 ? "CT" : "TERRORIST")
new ptr = create_tr2()
set_tr2(ptr, TR_iHitgroup, HIT_HEAD)
new Float:flDirection[3]
new players[32], num
get_players(players, num, "aeh", szTeam)
for(new i; i < num; i++)
{
ExecuteHamB(Ham_TraceAttack, players[i], id, 147.0, flDirection, ptr, DMG_NEVERGIB | DMG_BULLET)
}
free_tr2(ptr)
}
__________________