Not a functional improvement but you can reduce code:
PHP Code:
public PostTakeDamage(iVictim, iInflictor, iAttacker, Float:iDamage, iDamagebits)
{
new iRed, iGreen, iBlue;
if(get_pcvar_num(pPlugin) && is_user_connected(iAttacker) && (get_user_team(iVictim) != get_user_team(iAttacker)))
{
new iSnipersOnly = get_pcvar_num(pSnipersOnly);
if( ( iSnipersOnly && ( gWeaponList & (1 << get_user_weapon(iAttacker))) ) || !iSnipersOnly )
{
if(get_pcvar_num(pRainbow))
{
iRed = iRainbow;
iGreen = iRainbow;
iBlue = iRainbow;
}
else
{
iRed = get_pcvar_num(pColorRed);
iGreen = get_pcvar_num(pColorGreen);
iBlue = get_pcvar_num(pColorBlue);
}
set_hudmessage(iRed, iGreen, iBlue, get_pcvar_float(pXPosition), get_pcvar_float(pYPosition) , 0, 2.0, get_pcvar_float(pHoldTime) , 0.0, 0.0, -1);
show_hudmessage(iAttacker, "%s" , get_pcvar_num(pRandomHitmarkers) ? szSymbols[random(sizeof(szSymbols))] : "x");
}
}
}
__________________