GetHomebaseMaterial
Category: Player
Since engine version: 4.6.5.0 CP
Description
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.
Syntax
int GetHomebaseMaterial
(int iPlr, id id, int iIndex, int dwCategory);
Parameters
- iPlr:
-
Number of the player whose buying options to determine.
- id:
-
[optional] If specified, the function returns the number of objects of the given type which the player can buy at his home base. In this
case iIndex and dwCategory are ignored.
- iIndex:
-
[optional] List index of the buyable item to check.
- dwCategory:
-
[optional] Category of buyable items you want to check.
Example
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("Das dritte kaufbare Fahrzeug des Spielers ist %i",0,def);
Gives the notice "The third buyable vehicle of this player is XBOW"
Günther, February 2002