Quote:
engclient_cmd(id, "drop", "weapon_c4")
set_task(0.1, "delete_c4")
|
You do not need a task because the backack is created right after drop emulation.
Also in the article
[HOWTO] detect weapon drop details [including drop type, weapon type, etc] i've wrote that
Quote:
|
Note: The weaponbox entity is not the actual weapon, it is the "box" entity that "contain" the weapon_* entity, i.e. the actual weapon entity.
|
In other words your backpack isn't the only entity that should be removed. There are also a weapon_c4 entity that is linked to a weaponbox, i.e. your backpack. There is a safe weaponbox/weapon_* entity deletion method: just force weaponbox Think and it will remove the entity pair almost instantly and safely using the default game methods.
Quote:
|
Also, is there a way to remove hostages as well?
|
Hook Spawn in plugin_precache and remove/supercede the corresponding entity - the most safe way.