void change2(int busca, void Anim)

        
{ 



    

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


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

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

         

         if(vName==busca)
                    {

                       if(getentityproperty(vEntity, "animationid")==openborconstant("ANI_IDLE"))

                              {
                                changeentityproperty(vEntity, "velocity", 0, 0, 0); 
                                changeentityproperty(vEntity, "animation", openborconstant(Anim));
                              }
                    }
         }

}

