TakeDamage problem
It has to only hurt players around him from other team but it kills and the player which exploded doesn't respawn, I can't seem to find the problem.
PHP Code:
else if ( ( distancebetween < 200 ) && gInfected[victim] && get_user_team(victim) == 1 && iClass[victim] == 5 && get_user_team(attacker) != get_user_team(victim))
{
new iOrigin[ 3 ];
get_user_origin( victim, iOrigin );
new gmsgShake = get_user_msgid("ScreenShake")
message_begin(MSG_ONE, gmsgShake, _, attacker)
write_short(255<< 14 ) //ammount
write_short(5 << 14) //lasts this long
write_short(255<< 14) //frequency
message_end()
message_begin(MSG_ONE, g_msgScreenFade, _, attacker);
write_short(4096 * 3);
write_short(4096 * 3);
write_short(4096);
write_byte(150);
write_byte(0);
write_byte(0);
write_byte(220);
message_end();
ExecuteHam(Ham_TakeDamage, attacker, id, id, 20.0, DMG_GENERIC);
Create_BeamCylinder( iOrigin, 120, gCylinderSprite, 0, 0, 6, 16, 0, 255, 0, 0, 100, 0 );
}
|