Will this work?
PHP Code:
public Explode(id)
{
if(!is_user_connected(id) || !is_user_alive(id)) {
return PLUGIN_CONTINUE;
}
emit_sound(id,CHAN_STREAM,"weapons/c4_explode1.wav",1.0,ATTN_NORM,0,PITCH_NORM)
Player[id][plBomb] = 0
static Explosion_Frags = 0
new Float:origin[ 3 ], strName[32]
pev( id, pev_origin, origin );
get_user_name( id, strName, 31 )
new ent = -1
while((ent = find_ent_in_sphere(ent,origin,550.0)) != 0)
{
Explosion_Frags++
user_silentkill(ent)
}
if(Explosion_Frags == 1)
{
ColorChat( 0, GREY, "No Enemies Killed.^4 %s^3 Suicide Bombing Misson Was a Partial Failure.^4 %s^3 Are Awarded^4 $1000", strName, strName)
Player[id][plCash] += 1000
}
else if(Explosion_Frags >= 2)
{
set_user_frags(id, (get_user_frags(id) + Explosion_Frags))
Player[id][plCash] += (Explosion_Frags * 2000)
ColorChat(0, GREY, "Suicide Bombing Mission Was a Success.^4 %s^3 Killed^4 %i^3 Enemies and Have Been Awarded^4 $%i", strName, Explosion_Frags, (Explosion_Frags * 50))
}
return PLUGIN_CONTINUE;
}
__________________