<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PL/getAge?action=history&amp;feed=atom</id>
	<title>PL/getAge - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PL/getAge?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PL/getAge&amp;action=history"/>
	<updated>2026-05-14T19:40:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PL/getAge&amp;diff=48324&amp;oldid=prev</id>
		<title>GabWas: GabWas moved page PL/GetAge to PL/getAge</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PL/getAge&amp;diff=48324&amp;oldid=prev"/>
		<updated>2016-07-21T14:14:25Z</updated>

		<summary type="html">&lt;p&gt;GabWas moved page &lt;a href=&quot;/wiki/PL/GetAge&quot; class=&quot;mw-redirect&quot; title=&quot;PL/GetAge&quot;&gt;PL/GetAge&lt;/a&gt; to &lt;a href=&quot;/wiki/PL/getAge&quot; title=&quot;PL/getAge&quot;&gt;PL/getAge&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:14, 21 July 2016&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-48315:rev-48324 --&gt;
&lt;/table&gt;</summary>
		<author><name>GabWas</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PL/getAge&amp;diff=48315&amp;oldid=prev</id>
		<title>ThePiotrek: Created page with &quot;{{PL/Useful Function}} &lt;lowercasetitle&gt;&lt;/lowercasetitle&gt; __NOTOC__ Ta funkcja wylicza wiek na podstawie podanej daty urodzenia.  ==Składnia== &lt;syntaxhighlight lang=&quot;lua&quot;&gt;int getAge(int day,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PL/getAge&amp;diff=48315&amp;oldid=prev"/>
		<updated>2016-07-21T13:27:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{PL/Useful Function}} &amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt; __NOTOC__ Ta funkcja wylicza wiek na podstawie podanej daty urodzenia.  ==Składnia== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getAge(int day,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PL/Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Ta funkcja wylicza wiek na podstawie podanej daty urodzenia.&lt;br /&gt;
&lt;br /&gt;
==Składnia==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getAge(int day, int month, int year)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wymagane argumenty===&lt;br /&gt;
* '''day''': Dzień w którym urodził się gracz.&lt;br /&gt;
* '''month''': Miesiąc w którym urodził się gracz.&lt;br /&gt;
* '''year''': Rok w którym urodził się gracz.&lt;br /&gt;
&lt;br /&gt;
==Kod==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Źródło funkcji&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAge(day, month, year)&lt;br /&gt;
	local time = getRealTime();&lt;br /&gt;
	time.year = time.year + 1900;&lt;br /&gt;
	time.month = time.month + 1;&lt;br /&gt;
	&lt;br /&gt;
	year = time.year - year;&lt;br /&gt;
	month = time.month - month;&lt;br /&gt;
	&lt;br /&gt;
	if month &amp;lt; 0 then &lt;br /&gt;
		year = year - 1 &lt;br /&gt;
	elseif month == 0 then&lt;br /&gt;
		if time.monthday &amp;lt; day then&lt;br /&gt;
			year = year - 1;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return year;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Przykład==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Przykład&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- prosty przykład:&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, getRootElement(), function()&lt;br /&gt;
	print(getAge(09, 04, 1989))&lt;br /&gt;
end);&lt;br /&gt;
-- To wyświetli:&lt;br /&gt;
-- 20&lt;br /&gt;
-- Tak, mam 20 lat!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Funkcja stworzona przez '''Alexander de Jong AKA mrdejong'''.&lt;br /&gt;
&lt;br /&gt;
==Zobacz także==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:GetAge]]&lt;/div&gt;</summary>
		<author><name>ThePiotrek</name></author>
	</entry>
</feed>