It's not exactly only bullets but that can be changed.
Code:
#include <amxmodx>
#include <csx>
#include <fun>
new pCvar_Chance, pCvar_Mult;
new gmsgDeathMsg;
public plugin_init() {
register_plugin("", "", "")
pCvar_Chance = register_cvar("randombullet_chance", "5"); // Percent
pCvar_Mult = register_cvar("randombullet_mult", "1.5");
gmsgDeathMsg = get_user_msgid("DeathMsg");
}
public client_damage(a, v, damage, wpnID, hitplace, TA) {
if ( ! a || random_num(1,100) > get_pcvar_num(pCvar_Chance) )
return;
damage = floatround( get_pcvar_float(pCvar_Mult) * damage ) - damage;
new vHealth = get_user_health(v);
if ( vHealth < damage ) {
user_silentkill(v);
new wpnName[32];
get_weaponname(wpnID, wpnName, 31);
message_begin(MSG_BROADCAST, gmsgDeathMsg);
write_byte(a);
write_byte(v);
write_byte(hitplace == 1 ? 1 : 0);
write_string(wpnName);
message_end();
set_user_frags(a, get_user_frags(a) + 1);
set_user_frags(v, get_user_frags(v) + 1);
}
else
set_user_health(v, vHealth - damage);
}