void wparent2(int busca, int weapon)



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

     if(parentmodel==busca)
      {
                      
                                changeentityproperty(parent, "weapon",weapon); //Switch to desired model.
                             
     
      }
     
     
}



