void cparent2(int modelname, int Anim)



{
 
   
     
     void self         = getlocalvar("self"); //Get calling entity.
     void parent       = getentityproperty(self, "parent");
     void parentmodel   = getentityproperty(parent, "model");
     void phealth      = getentityproperty(parent, "health");
              

               if(parentmodel==modelname)
                    {

                       changeentityproperty(self, "animation", openborconstant(Anim));
                    }
     
     
}