public item_mine(id){if (player_b_mine[id] >0 && is_user_alive(id) || c_mine[id] >0 && is_user_alive(id)){new count = 0new ents = -1ents = find_ent_by_owner(ents,"Mine",id)while (ents > 0){count++ents = find_ent_by_owner(ents,"Mine",id)}if (count > 2){hudmsg(id,2.0,"Mozesz polozyc maksymalnie 3 miny na runde")return PLUGIN_CONTINUE}new origin[3]pev(id,pev_origin,origin)new ent = Spawn_Ent("info_target")set_pev(ent,pev_classname,"Mine")set_pev(ent,pev_owner,id)set_pev(ent,pev_movetype,MOVETYPE_TOSS)set_pev(ent,pev_origin,origin)set_pev(ent,pev_solid,SOLID_BBOX)engfunc(EngFunc_SetModel, ent, "addons/amxmodx/diablo/mine.mdl")engfunc(EngFunc_SetSize,ent,Float:{-16.0,-16.0,0.0},Float:{16.0,16.0,2.0})drop_to_floor(ent)entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01)set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,50)use_addtofullpack = trueset_task(6.0,"wywal",id)}return PLUGIN_CONTINUE}public wywal(id){if(is_user_connected(id)){new ent = find_ent_by_class(0, "Mine");while(ent > 0){if(entity_get_edict(ent, EV_ENT_owner) == id){remove_entity(ent);}}}}
Po postawieniu byta czasami crashuje serwer,wlasnie przez task.Jak to rozwiązać?