GetPlrMagic

Category: Player
Since engine version: 1.0 OC

Description

Determines magic spell knowledge of a player.

Syntax

bool / id GetPlrMagic(int player, id id, int index);

Parameters

player:
Player whose magic knowledge you want to determine.
id:
With id specified the function returns true, if the specified player knows the specified spell. In this case index is ignored.
index:
With index specified the function returns the indicated spell from the player's list of known spells.

Examples

if (GetPlrMagic(0,Magic_Lightning))
	Log("Player %s can create lightnings",GetPlayerName(0));
				
If player 0 knows the lightning spell, a message is displayed.
var spell = GetPlrMagic(0,0,4);
Log("The fifth spell of the first player is %i",spell);
				
Returns the id of the fifth spell of the first player.
jwk, 2002-06