GetFactionLeader(object)
Gets the leader of a players party.
object GetFactionLeader( object oMemberOfFaction );
Parameters
oMemberOfFaction
Player object that is in the party of the leader you are seeking.
Description
Returns the leader (in an object variable) of the faction (party) of which oMemberOfFaction is a member.
Return value is OBJECT_INVALID if oMemberOfFaction is not a valid creature.
Remarks
Used to get the leader of a player run party. Does not look like it can be used for creature factions as there is no way to define a leader for them.
Version
1.28
Example
// Placed in the Modules OnPlayerDeath Event, this will send a message to the player's party leader, informing them that they died. void main() { object oPlayer = GetLastPlayerDied(); object oLeader = GetFactionLeader(oPlayer); string sName = GetName(oPlayer); if (GetIsObjectValid(oLeader) == TRUE) { SendMessageToPC(oLeader, sName + " has died!"); } }
See Also
functions: | GetFactionGold |
categories: | Party Functions | Reputation/Faction Functions |
author: John Shuell, editor: Charles Feduke, additional contributor(s): Nils Jeppe
Send comments on this topic.