WoW:API IsGuildLeader: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (New page: This function is used to determine if a player is the guild leader. There is a required variable. The variable is the a players name. When the function is run it will return a boolean re...)
 
m (Move page script moved page API IsGuildLeader to API IsGuildLeader without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Returns the a boolean value.
  guildmaster = IsGuildMaster()
  TrueFalse = IsGuildLeader("PlayerName");
This function checks to see if you are the guild master of a guild and returns the appropriate result.


==Parameters==
==Parameters==
===Arguments===
 
:;PlayerName : Boolean - Player to check for guild master status?
===Returns===
===Returns===
:;TrueFalse : True is person is Guild Master, False if they are not.
:;guildmaster : True if you are a guild master, otherwise false.


==Example==
==Example==
player = UnitName("player");
  if (IsGuildLeader() == true) then
  if (IsGuildLeader(player) == true) then
     DEFAULT_CHAT_FRAME:AddMessage("You are a Guild master");
     DEFAULT_CHAT_FRAME:AddMessage(player.." you are a Guild master");
  else
  else
     DEFAULT_CHAT_FRAME:AddMessage(player.." you are not a Guild master");
     DEFAULT_CHAT_FRAME:AddMessage("You are not a Guild master");
  end
  end
===Result===
===Result===
  Displays a message stating if your a guild master or not.
  Displays a message stating if your a guild master or not.

Latest revision as of 04:46, 15 August 2023

WoW API < IsGuildLeader

guildmaster = IsGuildMaster()

This function checks to see if you are the guild master of a guild and returns the appropriate result.

Parameters[edit]

Returns[edit]

guildmaster
True if you are a guild master, otherwise false.

Example[edit]

if (IsGuildLeader() == true) then
    DEFAULT_CHAT_FRAME:AddMessage("You are a Guild master");
else
    DEFAULT_CHAT_FRAME:AddMessage("You are not a Guild master");
end

Result[edit]

Displays a message stating if your a guild master or not.