I tried to plant the C4 right when you spawn with the bombsite is the whole map. I found a way that create a fake C4 but it won't work with BOT since bot hook
NETMSG_TEXTMSG #Bomb_Planted so it will just run around even when enemy team is all dead rather than defusing the bomb.
This is what I got so far.
PHP Code:
public plugin_precache()
{
CreateBombTarget();
}
public fw_Player_Spawn_Post(id)
{
if(is_user_alive(id) && user_has_weapon(id, CSW_C4))
{
engclient_cmd(id, "weapon_c4")
static ent; ent = fm_get_user_weapon_entity(id, CSW_C4)
ExecutreHam(Ham_Weapon_PrimaryAttack, ent)
}
}
public CreateBombTarget()
{
new NewBombTarget = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_bomb_target"))
if(NewBombTarget > 0)
{
dllfunc(DLLFunc_Spawn, NewBombTarget)
engfunc(EngFunc_SetSize, NewBombTarget, Float:{-100000.0,-100000.0,-100000.0}, Float:{100000.0,100000.0,100000.0})
}
}
I have also tried those offset but it seem doesn't work too
PHP Code:
#define m_bStartedArming 320
#define m_bBombPlacedAnimation 321
#define m_flArmedTime 81
I also tried
Auto Plant plugins but it doesn't work.
This only show the starting part and a bar time but it can't actually plant the bomb.
It is the best if it can play full animation but as long as it can be plant, I am happy with that.
__________________