<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.crymod.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wiki.crymod.net/index.php?action=history&amp;feed=atom&amp;title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0%2F%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0</id>
		<title>Функции клиента/сервера - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.crymod.net/index.php?action=history&amp;feed=atom&amp;title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0%2F%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0"/>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;action=history"/>
		<updated>2026-08-06T10:39:24Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=2493&amp;oldid=prev</id>
		<title>Alex626: /* Введение */</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=2493&amp;oldid=prev"/>
				<updated>2011-06-11T12:40:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Введение&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Предыдущая&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Версия 12:40, 11 июня 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Введение =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Введение =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Начая скриптинг в мультиплеере, мы понимаем, что простые вещи становятся более &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;сложней&lt;/del&gt;. В сингплеере, нам не нужно заботиться о подключении клиентов посреди игры, их отключении, архитектуре «Клиент/Сервер» и тому подобное.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Начая скриптинг в мультиплеере, мы понимаем, что простые вещи становятся более &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;сложными&lt;/ins&gt;. В сингплеере, нам не нужно заботиться о подключении клиентов посреди игры, их отключении, архитектуре «Клиент/Сервер» и тому подобное.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Но, как только вы захотите добиться от многопользовательской игры&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/del&gt;всего того, что вы считает необходимым, то не стоит сразу же куда-то убегать, ведь система Lua в Crysis достаточно гибка. Эта статья объяснит вам, как работает архитектура «Клиент/Сервер» в Crysis (Lua), и то, как вы можете создать свои собственные функции, выполняющиеся от сервера к клиенту, или наоборот.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Но, как только вы захотите добиться от многопользовательской игры всего того, что вы считает необходимым, то не стоит сразу же куда-то убегать, ведь система Lua в Crysis достаточно гибка. Эта статья объяснит вам, как работает архитектура «Клиент/Сервер» в Crysis (Lua), и то, как вы можете создать свои собственные функции, выполняющиеся от сервера к клиенту, или наоборот.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Дверь =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= Дверь =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alex626</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=2491&amp;oldid=prev</id>
		<title>DCamer в 19:23, 10 июня 2011</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=2491&amp;oldid=prev"/>
				<updated>2011-06-10T19:23:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Предыдущая&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Версия 19:23, 10 июня 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!-- Please enter the information about your article for each section&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp; &amp;nbsp;  after the equal sign. The information will be translated into a&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;nbsp; &amp;nbsp;  formatted page upon being saved.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Категория:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Категория:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Article&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Статья&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;автор&lt;/ins&gt;=ins&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- The name of the author of the article (Wiki username) --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;сложность&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Средняя&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;author&lt;/del&gt;=ins&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;совместимости&lt;/ins&gt;=1.2+&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;требования&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Текстовый редактор&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- Skill Level (Beginner, Intermediate, Advanced, Expert)---&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;добавлена&lt;/ins&gt;=15/11/08&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;skill&lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Intermediate&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;обновлена&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;10/06&lt;/ins&gt;/11&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- Compatibility level (All, 1.0, 1.1, 1.2, 1.2.1, Temporary Fix) --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;compatibility&lt;/del&gt;=1.2+&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- Programs required (3DSMax, Sandbox2, XSI Mod Tool ...)--&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;requirements&lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Text Editor&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- Date when this article was created (dd/mm/yy) --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dateadded&lt;/del&gt;=15/11/08&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- Date when this article was lastly updated (dd/mm/yy) --&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;datelastupdate&lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;15&lt;/del&gt;/11&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;/08&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!--Write your article here---&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Введение &lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Начая скриптинг в мультиплеере&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;мы понимаем, что простые вещи становятся более сложней&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;В сингплеере, нам не нужно заботиться о подключении клиентов посреди игры&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;их отключении&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;архитектуре «Клиент&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Сервер» и тому подобное&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Introduction &lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;When we want to script in multiplayer&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;things get more complex&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In singleplayer we do not have to care about connecting clients mid-game&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;disconnects&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;client&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;server achitecture and all that&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;But once you want to get into the multiplayer side&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;everything needs to be considered. Don’t run away yet though&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;Crysis &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lua system is quite flexible&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This article will explain how the client&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;server architecture works in &lt;/del&gt;Crysis (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lua&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and how you can make your own functions execute from server to client or the other way around&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Но&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;как только вы захотите добиться от многопользовательской игры&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;всего того, что вы считает необходимым, то не стоит сразу же куда-то убегать, ведь система Lua в &lt;/ins&gt;Crysis &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;достаточно гибка&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Эта статья объяснит вам, как работает архитектура «Клиент&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Сервер» в &lt;/ins&gt;Crysis (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Lua&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, и то, как вы можете создать свои собственные функции, выполняющиеся от сервера к клиенту, или наоборот&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The door &lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;= &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Дверь &lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To start things of we’ll have a look at an entity which is already present in &lt;/del&gt;Crysis: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the door&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The file is located at &lt;/del&gt;'''Scripts/Entities/Doors/Door.lua'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для начала, нам стоит посмотреть на сущность, которая уже присутствует в игре &lt;/ins&gt;Crysis: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;дверь&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Файл размещён здесь: &lt;/ins&gt;'''Scripts/Entities/Doors/Door.lua'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Net Expose ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Net Expose ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The first network-related code we see is the &lt;/del&gt;Net.Expose &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;with a table as argument&lt;/del&gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Первым кодом, связанным с сетью, мы видим функцию &lt;/ins&gt;Net.Expose (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;с таблицей в качестве аргумента&lt;/ins&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;notable&lt;/del&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;заметка&lt;/ins&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Net.Expose {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Net.Expose {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	},&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	},&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;};&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;};&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The first thing in the table is the &lt;/del&gt;Class. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The class is defined at the top of the file&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Первым в таблице стоит '''&lt;/ins&gt;Class&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Класс определён в верхней части файла&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;notable&lt;/del&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;заметка&lt;/ins&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Door = &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Door = &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 114:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Keep that in mind when making your own entity multiplayer-compatible&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Call &lt;/del&gt;Net.Expose '''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;AFTER&lt;/del&gt;''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;defining your class&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Имейте это в виду при создании собственных сущеостей, совместимых с мультиплеером&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Вызывайте ''&lt;/ins&gt;Net.Expose'' '&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''ПОСЛЕ&lt;/ins&gt;''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;определённого вами класса&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;After that&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we can see the &lt;/del&gt;Client &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;Server &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;methods&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;После него&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;мы видим методы '''&lt;/ins&gt;Client&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' и '''&lt;/ins&gt;Server&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;notable&lt;/del&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{Lua_Code|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;заметка&lt;/ins&gt;=1|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	ClientMethods = {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	ClientMethods = {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 129:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 107:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In here we define what functions can get called over the network&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Здесь мы определяем какие функции могут вызываться через сеть&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;''' ClientMethods '''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;'''ClientMethods''': &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Эти функции выполняются на клиенте&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;по запросу сервера&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;These functions are executed on the client&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;requested by the server&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;'''ServerMethods'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;'''ServerMethods''': &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Функции в этой таблице&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;будут выполнены на сервере, по запросу клиента&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The functions in this table will be executed on the server&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;requested by the client&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now let’s take a closer look at what info the Net.Expose function needs for these functions.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[#FunctionName|FunctionName]] = { [[#Reliability|RELIABILITY]], [[#Attachment|ATTACHMENT]], [[#FunctionArgs|FUNCTIONARGS]] },&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Теперь давайте подробно рассмотрим, какую информацию требует функция ''Net.Expose'' для выполнения этих функций.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[#FunctionName|НазваниеФункции]] = { [[#Reliability|НАДЕЖНОСТЬ]], [[#Attachment|ПРИКРЕПЛЕНИЕ]], [[#FunctionArgs|ТИПАРГУМЕНТОВ]] },&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;FunctionName&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;FunctionName&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Function name&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Название функции&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The first thing it needs is a function name&lt;/del&gt;. The unwritten rule is to prefix client-functions with Cl and server-functions with Sv.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Первое что мы видим — название функции&lt;/ins&gt;. The unwritten rule is to prefix client-functions with Cl and server-functions with Sv. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Неписаным правилом являются префиксы функций клиента с Cl и серверных функций с Sv.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;Reliability&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;Reliability&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>DCamer</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=825&amp;oldid=prev</id>
		<title>Alex626: Новая страница: «&lt;!-- Please enter the information about your article for each section      after the equal sign. The information will be translated into a      formatted page upon b...»</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php?title=%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8_%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%B0/%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0&amp;diff=825&amp;oldid=prev"/>
				<updated>2010-12-23T20:25:23Z</updated>
		
		<summary type="html">&lt;p&gt;Новая страница: «&amp;lt;!-- Please enter the information about your article for each section      after the equal sign. The information will be translated into a      formatted page upon b...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please enter the information about your article for each section&lt;br /&gt;
     after the equal sign. The information will be translated into a&lt;br /&gt;
     formatted page upon being saved.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Категория:Lua]]&lt;br /&gt;
{{Article&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The name of the author of the article (Wiki username) --&amp;gt;&lt;br /&gt;
|author=ins&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Skill Level (Beginner, Intermediate, Advanced, Expert)---&amp;gt;&lt;br /&gt;
|skill=Intermediate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Compatibility level (All, 1.0, 1.1, 1.2, 1.2.1, Temporary Fix) --&amp;gt;&lt;br /&gt;
|compatibility=1.2+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Programs required (3DSMax, Sandbox2, XSI Mod Tool ...)--&amp;gt;&lt;br /&gt;
|requirements=Text Editor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Date when this article was created (dd/mm/yy) --&amp;gt;&lt;br /&gt;
|dateadded=15/11/08&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Date when this article was lastly updated (dd/mm/yy) --&amp;gt;&lt;br /&gt;
|datelastupdate=15/11/08&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Write your article here---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
When we want to script in multiplayer, things get more complex. In singleplayer we do not have to care about connecting clients mid-game, disconnects, client/server achitecture and all that.&lt;br /&gt;
&lt;br /&gt;
But once you want to get into the multiplayer side, everything needs to be considered. Don’t run away yet though, the Crysis lua system is quite flexible. This article will explain how the client/server architecture works in Crysis (lua) and how you can make your own functions execute from server to client or the other way around.&lt;br /&gt;
&lt;br /&gt;
= The door =&lt;br /&gt;
To start things of we’ll have a look at an entity which is already present in Crysis: the door. The file is located at '''Scripts/Entities/Doors/Door.lua'''&lt;br /&gt;
&lt;br /&gt;
== Net Expose ==&lt;br /&gt;
The first network-related code we see is the Net.Expose function (with a table as argument).&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Net.Expose {&lt;br /&gt;
	Class = Door,&lt;br /&gt;
	ClientMethods = {&lt;br /&gt;
		ClSlide = { RELIABLE_UNORDERED, POST_ATTACH, BOOL },&lt;br /&gt;
		ClRotate = { RELIABLE_UNORDERED, POST_ATTACH, BOOL, BOOL },&lt;br /&gt;
	},&lt;br /&gt;
	ServerMethods = {&lt;br /&gt;
		SvRequestOpen = { RELIABLE_UNORDERED, POST_ATTACH, ENTITYID, BOOL },&lt;br /&gt;
	},&lt;br /&gt;
	ServerProperties = {&lt;br /&gt;
	},&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
The first thing in the table is the Class. The class is defined at the top of the file:&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Door = &lt;br /&gt;
{&lt;br /&gt;
	Properties = &lt;br /&gt;
	{&lt;br /&gt;
		soclasses_SmartObjectClass = &amp;quot;Door&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
		fileModel = &amp;quot;Objects/library/furnishings/doors/toiletstall_door_local.cgf&amp;quot;,&lt;br /&gt;
		&lt;br /&gt;
		Sounds = &lt;br /&gt;
		{&lt;br /&gt;
			soundSoundOnMove = &amp;quot;sounds/doors/wooddooropen.wav&amp;quot;,&lt;br /&gt;
			soundSoundOnStop = &amp;quot;&amp;quot;,&lt;br /&gt;
			soundSoundOnStopClosed = &amp;quot;&amp;quot;,&lt;br /&gt;
			fVolume = 200,&lt;br /&gt;
			fRange = 50,&lt;br /&gt;
		},		&lt;br /&gt;
		Rotation = &lt;br /&gt;
		{&lt;br /&gt;
			fSpeed = 200.0,&lt;br /&gt;
			fAcceleration = 500.0,&lt;br /&gt;
			fStopTime = 0.125,&lt;br /&gt;
			fRange = 90,&lt;br /&gt;
			sAxis = &amp;quot;z&amp;quot;,&lt;br /&gt;
			bRelativeToUser = 1,&lt;br /&gt;
			sFrontAxis = &amp;quot;y&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
		Slide = &lt;br /&gt;
		{&lt;br /&gt;
			fSpeed = 2.0,&lt;br /&gt;
			fAcceleration = 3.0,&lt;br /&gt;
			fStopTime = 0.5,&lt;br /&gt;
			fRange = 0,&lt;br /&gt;
			sAxis = &amp;quot;x&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
		fUseDistance = 2.5,&lt;br /&gt;
		bLocked = 0,&lt;br /&gt;
		bSquashPlayers = 0,&lt;br /&gt;
		bActivatePortal = 0,&lt;br /&gt;
  },&lt;br /&gt;
  	&lt;br /&gt;
	PhysParams = &lt;br /&gt;
	{ &lt;br /&gt;
		mass = 0,&lt;br /&gt;
		density = 0,&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	sounds = {},&lt;br /&gt;
	&lt;br /&gt;
	Server = {},&lt;br /&gt;
	Client = {},&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
Keep that in mind when making your own entity multiplayer-compatible. Call Net.Expose '''AFTER''' defining your class.&lt;br /&gt;
&lt;br /&gt;
After that, we can see the Client and Server methods&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
	ClientMethods = {&lt;br /&gt;
		ClSlide = { RELIABLE_UNORDERED, POST_ATTACH, BOOL },&lt;br /&gt;
		ClRotate = { RELIABLE_UNORDERED, POST_ATTACH, BOOL, BOOL },&lt;br /&gt;
	},&lt;br /&gt;
	ServerMethods = {&lt;br /&gt;
		SvRequestOpen = { RELIABLE_UNORDERED, POST_ATTACH, ENTITYID, BOOL },&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
In here we define what functions can get called over the network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;''' ClientMethods '''&lt;br /&gt;
: These functions are executed on the client, requested by the server.&lt;br /&gt;
&lt;br /&gt;
;'''ServerMethods'''&lt;br /&gt;
: The functions in this table will be executed on the server, requested by the client.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let’s take a closer look at what info the Net.Expose function needs for these functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#FunctionName|FunctionName]] = { [[#Reliability|RELIABILITY]], [[#Attachment|ATTACHMENT]], [[#FunctionArgs|FUNCTIONARGS]] },&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;FunctionName&amp;quot;&amp;gt;&lt;br /&gt;
* Function name&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The first thing it needs is a function name. The unwritten rule is to prefix client-functions with Cl and server-functions with Sv.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Reliability&amp;quot;&amp;gt;&lt;br /&gt;
* Reliability Type&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 50px;&amp;quot;&amp;gt;&lt;br /&gt;
;RELIABLE_ORDERED&lt;br /&gt;
: Ensures the packets are delivered, and in the correct order.&lt;br /&gt;
;RELIABLE_UNORDERED&lt;br /&gt;
: Ensures the packets are delivered, but with the possibility of receiving them in a different order.&lt;br /&gt;
;UNRELIABLE_ORDERED&lt;br /&gt;
: Does not ensure that the packets are delivered, but makes sure they’re in the correct order if they are.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|It seems that UNRELIABLE_UNORDERED is not defined. However if you really need to use UNRELIABLE_UNORDERED, use the number 3 instead (The reliability defines are just numbers). }}&lt;br /&gt;
&lt;br /&gt;
The most used one is RELIABLE_UNORDERED. This will work just fine for most functions. If you’re repeatidly sending the same function and it needs to arrive in order, use RELIABLE_ORDERED.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Attachment&amp;quot;&amp;gt;&lt;br /&gt;
* Attachment Type&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 50px;&amp;quot;&amp;gt;&lt;br /&gt;
;NO_ATTACH&lt;br /&gt;
&lt;br /&gt;
;POST_ATTACH&lt;br /&gt;
&lt;br /&gt;
;PRE_ATTACH&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;FunctionArgs&amp;quot;&amp;gt;&lt;br /&gt;
* Function argument types&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last thing to do is listing the function arguments that need to be passed on the network. Possibilities are:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 50px;&amp;quot;&amp;gt;&lt;br /&gt;
;BOOL&lt;br /&gt;
: A boolean value (true/false)&lt;br /&gt;
;STRING&lt;br /&gt;
: A string&lt;br /&gt;
;INT8&lt;br /&gt;
: An integer of 8 bits&lt;br /&gt;
;INT32&lt;br /&gt;
: An integer of 32 bits&lt;br /&gt;
;VEC3&lt;br /&gt;
: A vector table (with x, y and z values)&lt;br /&gt;
;ENTITYID&lt;br /&gt;
: An entityId value&lt;br /&gt;
;FLOAT&lt;br /&gt;
: A floating point value&lt;br /&gt;
;STRINGTABLE&lt;br /&gt;
: A table with strings&lt;br /&gt;
;DEPENTITYID&lt;br /&gt;
: ???&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
There are probably more around, but those are the ones that are used the most.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just keep this in mind:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|When you want to execute functions from the server to the client, or the other way around, the functions need to be listed in a Net.Expose function (for Lua).}}&lt;br /&gt;
&lt;br /&gt;
== Function implementations ==&lt;br /&gt;
Let’s have a look at the actual functions now. How do they work and how do you call them?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== A server function: SvRequestOpen ===&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function Door.Server:SvRequestOpen(userId, open)&lt;br /&gt;
	local mode=DOOR_TOGGGLE;&lt;br /&gt;
	if (open) then&lt;br /&gt;
		mode=DOOR_OPEN;&lt;br /&gt;
	else&lt;br /&gt;
		mode=DOOR_CLOSE;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local user=System.GetEntity(userId);&lt;br /&gt;
	self:Open(user, mode);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first thing to note is the .Server just behind the ClassName. The Server part is a table in the Door class (table) generated by the Crysis Lua (Network) system.&lt;br /&gt;
&lt;br /&gt;
The function has to be in the Server table because we said it would be a server function in Net.Expose.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
	ServerMethods = {&lt;br /&gt;
		SvRequestOpen = { RELIABLE_UNORDERED, POST_ATTACH, ENTITYID, BOOL },&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
From this info, we know the first argument will be an entityid, and the second will be a boolean. If we go deeper inside the function we can see it sets the door to open or closed, depending on the argument, and then calls the Open() function. Let’s take a look at that.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function Door:Open(user, mode)&lt;br /&gt;
	local lastAction = self.action;&lt;br /&gt;
	&lt;br /&gt;
	if (mode == DOOR_TOGGLE) then&lt;br /&gt;
		if (self.action == DOOR_OPEN) then&lt;br /&gt;
			self.action = DOOR_CLOSE;&lt;br /&gt;
		else&lt;br /&gt;
			self.action = DOOR_OPEN;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		self.action = mode;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if (lastAction == self.action) then&lt;br /&gt;
		return 0;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if (self.Properties.Rotation.fRange ~= 0) then					&lt;br /&gt;
		local open=false;&lt;br /&gt;
		local fwd=true;&lt;br /&gt;
		&lt;br /&gt;
		if (self.action == DOOR_OPEN) then			&lt;br /&gt;
			if (user and (tonumber(self.Properties.Rotation.bRelativeToUser) ~=0)) then&lt;br /&gt;
				local userForward=g_Vectors.temp_v2;&lt;br /&gt;
				local myPos=self:GetWorldPos(g_Vectors.temp_v3);&lt;br /&gt;
				local userPos=user:GetWorldPos(g_Vectors.temp_v4);&lt;br /&gt;
				SubVectors(userForward,myPos,userPos);&lt;br /&gt;
				NormalizeVector(userForward);&lt;br /&gt;
				&lt;br /&gt;
				local dot = dotproduct3d(self.frontAxis, userForward);&lt;br /&gt;
							&lt;br /&gt;
				if (dot&amp;lt;0) then&lt;br /&gt;
					fwd=false;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			open=true;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		self.fwd=fwd;&lt;br /&gt;
		self:Rotate(open, fwd);&lt;br /&gt;
		self.allClients:ClRotate(open, fwd);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
...&lt;br /&gt;
	&lt;br /&gt;
	return 1;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
A lot of code here, but we will just look at the essentials. The function first sets the correct action (door state) and returns if it was the same as last time (ie: opening a door twice). Then it checks if there’s a Range value in the Door.Properties.Rotation table. If that’s the case, we have a rotating door. Next, it calls the Rotate() function, which will actually do the rotation (We haven’t done any rotating so far).&lt;br /&gt;
&lt;br /&gt;
Finally we send the new door status to all clients (the door has to open/close), so every connected client can see the door opening, with&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
self.allClients:ClRotate(open, fwd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
This is how we execute a function from the server -&amp;gt; client. We want all clients to execute the ClRotate function with the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
Instead of sending it to every client, there are also ways to limit the number of clients to send it to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To all clients&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
self.allClients:ClRotate(open, fwd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* To all clients, except 1&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
self.otherClients:ClRotate(channelId, open, fwd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* To 1 client&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
self.onClient:ClRotate(channelId, open, fwd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|channelId is a network channel number, which you can easily get from a player with playerEnt.actor:GetChannel()}}&lt;br /&gt;
&lt;br /&gt;
To send a function to only 1 specific team, you’ll have to loop through all players and check their team, and then send a command to them individually, using the method above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It’s time to look at the ClRotate function now.&lt;br /&gt;
&lt;br /&gt;
=== A client function: ClRotate ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function Door.Client:ClRotate(open, fwd)&lt;br /&gt;
	if (not self.isServer or g_gameRules.game:IsDemoMode() ~= 0) then&lt;br /&gt;
		if (open) then&lt;br /&gt;
			self.action=DOOR_OPEN;&lt;br /&gt;
		else&lt;br /&gt;
			self.action=DOOR_CLOSE;&lt;br /&gt;
		end&lt;br /&gt;
		self:Rotate(open, fwd);&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
As with the server function, we can see what the arguments will bring in Net.Expose: 2 booleans. The function itself is pretty simple, first we check if we are not a server (this is a common thing to do, we do not want the code to be executed twice on it) or if we are in demoplayback-mode. Then the action is set and self:Rotate() is called.&lt;br /&gt;
&lt;br /&gt;
In the Door:Rotate() function we do the actual turning of the door, which is not in the scope of this article.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The final thing you might wonder is: When and how has initiated the SvRequestOpen function? A search in the file leads us to the Door:OnUsed() function.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function Door:OnUsed(user)	&lt;br /&gt;
	self.server:SvRequestOpen(user.id, self.action~=DOOR_OPEN);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
The OnUsed function gets called by the lua system when using an entity (in this case, the door). So when a client (not necessarily you) uses a door, he will send a request to open the door, to the server.&lt;br /&gt;
&lt;br /&gt;
You can see the syntax for client-&amp;gt;server is even more simple than server-&amp;gt;client. We just have to add a '''''.server''''' part and we’re good to go.&lt;br /&gt;
{{Warning|Do not forget Lua is case sensitive. If you use .Server instead of .server, it won't work.}}&lt;br /&gt;
&lt;br /&gt;
== Schematic form ==&lt;br /&gt;
[[Файл:ClientServer Door.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Handling connecting clients ==&lt;br /&gt;
The final thing we have to consider is clients connecting in the middle of the game. Say client A opens a door. After a while client B connects. If client B runs up to the door he will see a closed door, since he didn’t get the 'open' message from the server, which was sent at the time client A opened the door.&lt;br /&gt;
&lt;br /&gt;
To solve this there’s a function which gets called when a client connects: OnInitClient.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function Door.Server:OnInitClient(channelId)&lt;br /&gt;
	if (self.Properties.Rotation.fRange ~= 0) then					&lt;br /&gt;
		local open=self.action == DOOR_OPEN;&lt;br /&gt;
		self.onClient:ClRotate(channelId, open, self.fwd or false);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if (self.Properties.Slide.fRange ~= 0) then			&lt;br /&gt;
		local open=(self.action == DOOR_OPEN);&lt;br /&gt;
		self.onClient:ClSlide(channelId, open);&lt;br /&gt;
	end&lt;br /&gt;
end&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When a client connects, this function gets called. It just sends the current state of the door to the client. So if client B now runs up to the door, he should see it’s open.&lt;/div&gt;</summary>
		<author><name>Alex626</name></author>	</entry>

	</feed>