here's my little issue:
Code:
public WeaponDrop(id) {
engclient_cmd(id,"drop","weapon_usp")
set_task(0.1,"DeleteUSP")
}
public DeleteUSP() {
new USP,szModel[33]
while ((USP = find_ent_by_class(-1, "weapon_usp")) != 0)
{
entity_get_string(USP, EV_SZ_model, szModel, 32)
if (equali(szModel, "models/w_usp.mdl"))
{
remove_entity(USP)
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
as soon usp is dropped, the remove task performs and the server crashes. any suggestions?