void searchal(int busca)

        
{ 



    

        int  iEntity; 
        void vEntity;
        void self        = getlocalvar("self");
        void parent      = getentityproperty(self, "parent");
        int  iMax        = openborvariant("ent_max");   
       
        


        for(iEntity=0; iEntity<iMax; iEntity++)
        {

        
        vEntity = getentity(iEntity);
        void  vName   = getentityproperty(vEntity, "model");
        void health   = getentityproperty(vEntity, "health");
        

         

         if(vName==busca && health >=1)
                    {

                                changeentityproperty(vEntity, "noaicontrol", 1);
                                changeentityproperty(vEntity, "velocity", 0, 0, 0); 
                                damageentity(self, parent , 1000, 1, openborconstant("ATK_NORMAL9" ));
                                
                              
                    }
         }

}

