[Help]how to make this explosion kill only enemys
Code:
doBullets()
{
self endon ( "disconnect" );
self endon ( "death" );
for(;;)
{
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/helicopter_explosion_secondary_small");
playfx(level.chopper_fx["explode"]["medium"], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 75, 150, 75, self );
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
ok this is a code... and now I want it to kill ONLY enemys and it can't hurt me
like when I shoot in the floor next to me I won't get damaged and die??
can someone pls help me?