GetPlrKnowledge

Category: Player
Since engine version: 4.6.5.0 CP

Description

With id specified the function returns true if the player has the construction plan of the specified object. In this case iIndex and dwCategory are ignored. If id is 0, the function returns the indicated construction plan of the specified category.

Syntax

int GetPlrKnowledge (int iPlr, id id, int iIndex, int dwCategory);

Parameters

iPlr:
Player whose construction plans you want to determine.
id:
[opt] If specified, the function returns true, if the player has the construction plan of the specified object.
iIndex:
[opt] Specify only if id is not 0.
dwCategory:
[opt] Specify only if id is not 0.

Example

if(GetPlrKnowledge(0,HUT1))
	Message("Spieler %s kann Bambushütten bauen",0,GetPlayerName(0));
Displays a message if the first player has the construction plan for bamboo huts.
var def = GetPlrKnowledge( 0,0,4,C4D_Structure()) );
Message("Der fünfte Gebäude-Bauplan des Spielers ist %i",0,def);
See also: C4D_All, C4D_Goal, C4D_Knowledge, C4D_Living, C4D_Object, C4D_Rule, C4D_StaticBack, C4D_Structure, C4D_Vehicle, SetPlrKnowledge
Günther, Februar 2002