I'm not very good with entities but is this the correct way for dropping the C4 then removing it?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init() {
register_event("StatusIcon", "c4_dropped", "be", "1=1", "1=2", "2=c4")
}
public c4_dropped(id) {
engclient_cmd(id, "drop", "weapon_c4")
set_task(0.1, "delete_c4")
}
public delete_c4() {
new ent = find_ent_by_class(-1, "weaponbox")
while (ent > 0) {
new model[33]
entity_get_string(ent, EV_SZ_model, model, 32)
if (equali(model, "models/w_backpack.mdl")) {
remove_entity(ent)
return PLUGIN_CONTINUE
}
ent = find_ent_by_class(ent, "weaponbox")
}
return PLUGIN_CONTINUE
}
Also, is there a way to remove hostages as well?
__________________