<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://modiki.civfanatics.com/index.php?action=history&amp;feed=atom&amp;title=Player.GetNumResourceAvailable_%28Civ5_API%29</id>
	<title>Player.GetNumResourceAvailable (Civ5 API) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://modiki.civfanatics.com/index.php?action=history&amp;feed=atom&amp;title=Player.GetNumResourceAvailable_%28Civ5_API%29"/>
	<link rel="alternate" type="text/html" href="https://modiki.civfanatics.com/index.php?title=Player.GetNumResourceAvailable_(Civ5_API)&amp;action=history"/>
	<updated>2026-04-10T22:14:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://modiki.civfanatics.com/index.php?title=Player.GetNumResourceAvailable_(Civ5_API)&amp;diff=11966&amp;oldid=prev</id>
		<title>DonQuich: Bot update</title>
		<link rel="alternate" type="text/html" href="https://modiki.civfanatics.com/index.php?title=Player.GetNumResourceAvailable_(Civ5_API)&amp;diff=11966&amp;oldid=prev"/>
		<updated>2012-09-20T08:26:38Z</updated>

		<summary type="html">&lt;p&gt;Bot update&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Civ5 API Beta Banner}}&lt;br /&gt;
&amp;#039;&amp;#039;This page is a part of the [[Lua and UI Reference (Civ5)]].&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TypeInfos5|Function.png|This function is a member of {{Type5|Player}}.&amp;lt;br/&amp;gt;&lt;br /&gt;
This is an instance method, invoke it with a colon.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;int&amp;#039;&amp;#039;&amp;#039; Player:GetNumResourceAvailable&amp;lt;b&amp;gt;(&amp;lt;/b&amp;gt;{{Type5|ResourceType}} resource, &amp;#039;&amp;#039;&amp;#039;bool&amp;#039;&amp;#039;&amp;#039; includeImport&amp;lt;b&amp;gt;)&amp;lt;/b&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Returned Value&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:No description available.&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Parameters&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; style=&amp;quot;padding-right:6px;&amp;quot;|resource:&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;| &amp;#039;&amp;#039;No description available.&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; style=&amp;quot;padding-right:6px;&amp;quot;|includeImport:&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;| &amp;#039;&amp;#039;No description available.&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Source code samples=&lt;br /&gt;
&amp;#039;&amp;#039;Redundant occurences have been removed.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|DiploRelationships.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/Popups/DiploRelationships.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0337}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local iResourceCount = Players[iPlayer]:GetNumResourceAvailable( i, false );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|GenericWorldAnchor.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/GenericWorldAnchor.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0159}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (pPlayer:GetNumResourceAvailable(iResource) == 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|ResourceList.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/ResourceList.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0092}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iAvailable = pPlayer:GetNumResourceAvailable( iResource, true );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TopPanel.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/TopPanel.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0171}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iNumAvailable = pPlayer:GetNumResourceAvailable(iResourceLoop, true);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TradeLogic.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/WorldView/TradeLogic.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|1368}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iResourceCount = g_pUs:GetNumResourceAvailable( resType, false );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|1435}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iResourceCount = g_pThem:GetNumResourceAvailable( resType, false );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|2226}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (iAmount &amp;gt; Players[g_iUs]:GetNumResourceAvailable(resourceId, false)) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeLine5|2227}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iAmount = Players[g_iUs]:GetNumResourceAvailable(resourceId, false);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|2231}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (iAmount &amp;gt; Players[g_iThem]:GetNumResourceAvailable(resourceId, false)) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeLine5|2232}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iAmount = Players[g_iThem]:GetNumResourceAvailable(resourceId, false);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|2331}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (iNumResource &amp;gt; pPlayer:GetNumResourceAvailable(iResourceID, false)) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeLine5|2332}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;iNumResource = pPlayer:GetNumResourceAvailable(iResourceID, false);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|TutorialChecks.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;Tutorial/TutorialChecks.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|2792}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local amount = pPlayer:GetNumResourceAvailable(iResourceLoop, false);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|2816}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (pOtherPlayer:GetNumResourceAvailable(tradeableResource, true) == 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeBreak5}}&lt;br /&gt;
{{CodeLine5|2821}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if(pOtherPlayer:GetNumResourceAvailable(tradeableResource, false) &amp;gt; 0) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{PseudoH4|UnitPanel.lua}}&lt;br /&gt;
:&amp;lt;code&amp;gt;UI/InGame/WorldView/UnitPanel.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{CodeBegin5}}&lt;br /&gt;
{{CodeLine5|0994}}&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;if (iNumResourceNeededToUpgrade &amp;gt; 0 and iNumResourceNeededToUpgrade &amp;gt; pActivePlayer:GetNumResourceAvailable(iResourceLoop)) then&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{CodeEnd5}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Civ5 API Footer}}&lt;br /&gt;
[[Category:Civ5 Methods and Functions|GetNumResourceAvailable]]&lt;br /&gt;
[[Category:Civ5 Resources API|GetNumResourceAvailable]]&lt;/div&gt;</summary>
		<author><name>DonQuich</name></author>
	</entry>
</feed>