Next problem with this stock...
When I use:
PHP Code:
RegisterHamPlayer(Ham_TakeDamage, "BlockTakeDamage");
RegisterHamPlayer(Ham_TraceAttack, "BlockTraceAttack");
public BlockTakeDamage(id, iEnt, attacker) return vBlockTakeDamage(id, attacker);
public BlockTraceAttack(id, attacker) return vBlockTakeDamage(id, attacker);
vBlockTakeDamage(id, attacker) {
if(!userValid(id) || !userValid(attacker) || userTeam(id) != 1) return 1;
if(userTeam(attacker) == 2 || GetUserWeapon(attacker) != CSW_SCOUT) return 4;
if(userTeam(attacker) == 1) {
UserKill(id, _, attacker, _, _, 2, DMG_BULLET|DMG_ALWAYSGIB, false, true);
return 4;
}
return 1;
}
Everything works fine, but weapon name is incorrect
log:
Code:
"AmNezia<712><XXX><TERRORIST>" killed "Gruby RPK<686><XXX><TERRORIST>" with "world"