# GetPlrMagic

Player
5.1 OC
bool / id
int player Player whose magic knowledge you want to determine.
id id With id specified the function returns `true`, if the specified player knows the specified spell. In this case index is ignored.
int index With index specified the function returns the indicated spell from the player's list of known spells.
Determines magic spell knowledge of a player.
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