This plugin adds 10000health to a bot when it spawns (10100health)
and kills it when its health go lower than 10000 . (dont ask why =p)
Yes I have 100$ when I kill the bot BUT my frags didnt +1 imediately but only next round.
I think the set_msg_block(get_user_msgid("DeathMsg"),BLOC K_ONCE) is blocking it can someone help pls.
PHP Code:
register_event("Damage","event_damage_pain","be","2!0","3=0")
public event_damage_pain(id) // bot id
{
if(!is_user_alive(id))
return PLUGIN_HANDLED
new attacker = get_user_attacker(id)
if(is_user_bot(id))
{
new hp = get_user_health(id)
if(hp < 10000)
{
user_kill(id)
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
new frags , money
frags = get_user_frags(attacker)
fm_set_user_frags(attacker, frags+1)
money = cs_get_user_money(attacker)
cs_set_user_money(attacker, money+100)
}
}
return PLUGIN_CONTINUE
}