PHP Code:
HamRadiusDamage(ent, Float:radius, Float:damage, bits)
{
new target = 0, Float:origin[3], Float:o[3], maxplayers = get_maxplayers(), los = g_los, Float:fakeorig[3]
pev(ent, pev_origin, origin)
new owner = pev(ent, pev_owner)
xs_vec_copy(origin, fakeorig)
fakeorig[2] += 2.0
while(( target = engfunc(EngFunc_FindEntityInSphere, target, origin, radius) ))
{
if (maxplayers < target)
break
if (!is_user_alive(target))
continue
if (target == owner)
continue
if (!is_user_zombie(target))
continue
pev(target, pev_origin, o)
if (los && !is_in_los(fakeorig, o))
continue
xs_vec_sub(origin, o, o)
if (xs_vec_len(o) > radius)
continue
Ham_ExecDamageB(target, ent, pev(ent, pev_owner), damage * ((1.0 - (xs_vec_len(o) / radius))*2.0), HIT_GENERIC, bits)
Create_TE_BEAMENTS( ent, target, g_lightningSpr, 0, 15, 10, 20, 15, 255, 0, 0, 255, 0 )
}
}
As you can see there is check for zombie. But I delete that check because I will use this for public mod. But then I have problem:
The damage is done for enemy team but also for the players from my team.
How can I block this to doo damage to players from my team?