With id specified, the function returns the number of objects of that type which the player can buy at his home base. In this case iIndex and dwCategory are ignored. If id is 0, the function returns the id of the indicated type of objects of the specified category buyable at the players home base. This will return object types which are generally buyable, even if currently no object of that type is available.
Message("Spieler %s kann %d Flintstones kaufen",0,GetPlayerName(0), GetHomebaseMaterial(0,FLNT));
Returns the number of flint stones the first player can buy.
var def=GetHomebaseMaterial(0,0,3,C4D_Vehicle());
Message("Der dritte kaufbare Fahrzeugtyp des Spielers ist %i",0,def);
Gives the notice "The third buyable vehicle of this player is a ..."