Player.GetID (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of Player.

This is an instance method, invoke it with a colon.


Usage

PlayerID Player:GetID()


Returned Value

No description available.


Source code samples

Redundant occurences have been removed.

ChoosePantheonPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChoosePantheonPopup.lua
0082
CivIconHookup( pPlayer:GetID(), 64, Controls.CivIcon, Controls.CivIconBG, Controls.CivIconShadow, false, true );


ChooseReligionPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChooseReligionPopup.lua
0279
if (pActivePlayer:GetID() == pPlayer:GetID()) then


CityBannerManager.lua

UI/InGame/CityBannerManager.lua
0992
if (player:GetID() ~= Game.GetActivePlayer()) then
1252
OnCityCreated( ToHexFromGrid( Vector2( city:GetX(), city:GetY() ) ), player:GetID(), city:GetID() );


Demographics.lua

UI/InGame/Popups/Demographics.lua
0332
if (pPlayer:GetID() == Game.GetActivePlayer()) then


DiscussionDialog.lua

UI/InGame/LeaderHead/DiscussionDialog.lua
0908
local iCoopState = Players[g_iAIPlayer]:GetCoopWarAcceptedState(pActivePlayer:GetID(), iThirdPartyPlayer);


GameplayUtilities.lua

Gameplay/Lua/GameplayUtilities.lua
0014
local playerID = player:GetID();


MPList.lua

UI/InGame/WorldView/MPList.lua
0106
local bIsLocalPlayer = pPlayer:GetID() == Game.GetActivePlayer();
0144
CivIconHookup( pPlayer:GetID(), 32, controlTable.Icon, controlTable.CivIconBG, controlTable.CivIconShadow, false, true );
0147
UpdatePingTimeLabel( controlTable.Ping, pPlayer:GetID() );
0219
g_PlayerEntries[ pPlayer:GetID() ] = controlTable;


TutorialChecks.lua

Tutorial/TutorialChecks.lua
1127
local iQuest = pOtherPlayer:GetActiveQuestForPlayer(player:GetID());
1438
if (not pTargetPlot:IsWater() and pTargetPlot:IsVisibleEnemyUnit(player:GetID())) then
2465
if (Players[iPlotOwner]:GetMinorCivFriendshipLevelWithMajor(pPlayer:GetID()) < 1) then


TutorialChecks.lua (G&K)

DLC/Expansion/Tutorial/TutorialChecks.lua
1127
if (pOtherPlayer:GetMinorCivNumActiveQuestsForPlayer(player:GetID()) >= 0) then


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
1412
OnUnitCreated( player:GetID(), unit:GetID(), 0, 0, 0, 0, 0, 0, 0, WhiteFog, 0, 0, true );


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0264
local iPlayer = pPlayer:GetID();
0384
elseif(pPlayer:GetID() == Game.GetActivePlayer()) then
0385
if(PreGame.GetCivilizationShortDescription(pPlayer:GetID()) ~= "") then
0386
strPlayer = PreGame.GetCivilizationShortDescription(pPlayer:GetID());
0673
local iPlayerLoop = pPlayer:GetID();
0865
strCiv = PreGame.GetCivilizationShortDescription(pPlayer:GetID());


VoteResultsPopup.lua

UI/InGame/Popups/VoteResultsPopup.lua
0043
if ((pPlayer:GetID() == activePlayer:GetID()) or (activePlayer:GetTeam() == pTeam:GetID())) then
0047
CivIconHookup( pPlayer:GetID(), 32, controlTable.Icon, controlTable.IconBG, controlTable.IconShadow, false, true );
0082
CivIconHookup( pPlayer:GetID(), 32, controlTable.Icon, controlTable.IconBG, controlTable.IconShadow, false, true);
0121
elseif (pVoteCastPlayer:GetID() == Game.GetActivePlayer()) then



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.