<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Сайт клана pro.log</title>
		<link>http://pro-log.clan.su/</link>
		<description>Форум</description>
		<lastBuildDate>Sat, 01 Aug 2009 17:07:14 GMT</lastBuildDate>
		<generator>uCoz Web-Service</generator>
		<atom:link href="https://pro-log.clan.su/forum/rss" rel="self" type="application/rss+xml" />
		
		<item>
			<title>Создание amxx плагина</title>
			<link>https://pro-log.clan.su/forum/7-7-1</link>
			<pubDate>Sat, 01 Aug 2009 17:07:14 GMT</pubDate>
			<description>Форум: &lt;a href=&quot;https://pro-log.clan.su/forum/7&quot;&gt;AMXmodX&lt;/a&gt;&lt;br /&gt;Автор темы: El_zo0m&lt;br /&gt;Автор последнего сообщения: v3N0m&lt;br /&gt;Количество ответов: 3</description>
			<content:encoded>Статья предназначена для новичков в программировании, но что-нибудь мыслящих (например тех, кто хотя бы сумел с первого раза поставить amxx:, доступным языком. Супермегакуль-программеры могут распечатать эту статью и использовать её по назначению. &lt;p&gt; Что нам понадобится? amxx-studio или pstudio-0.8.2 взять можно на amxmodx.org Открыв программу amx-studio мы увидим типичный редактор с подсветкой кода не забудьте прописать в опциях путь к &amp;#92;addons&amp;#92;amxmodx&amp;#92;scripting&amp;#92;amxxpc.exe для генерирования плагинов в код который будет понятен нашей игре Counter Strike и у вас должен быть установлен AMXMod и соответственно должен быть сервер на котором он стоит. Я не буду объяснять вам как устанавливать и настраивать AMXMod на сервере, так как это очень хорошо описано у нас на сайте. &lt;p&gt; Это комментарий к программе. &lt;p&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;/* Plugin generated by AMXX-Studio */&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;p&gt; Мы можем изменить его скажем на: &lt;br /&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;/* Супер мега плагин, который ничего не делает, начинающего кулхацкера Васи Пупкина из бобруйска */ &lt;br /&gt; &lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;br /&gt; Это все информация о плагине и его авторе. &lt;br /&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;#define PLUGIN &quot;New Plugin&quot; &lt;br /&gt; #define VERSION &quot;1.0&quot; &lt;br /&gt; #define AUTHOR &quot;Author&quot;&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;p&gt; Можем изменить скажем на: &lt;br /&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;#define PLUGIN &quot;Pupkin Plugin&quot; &lt;br /&gt; #define VERSION &quot;1.0&quot; &lt;br /&gt; #define AUTHOR &quot;Bac9|&quot;&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;p&gt; Примечание: Здесь уже придется писать латиницей. &lt;p&gt; Это список модулей, которые мы будем использовать. &lt;br /&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;#include amxmodx&gt; &lt;br /&gt; #include amxmisc&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;p&gt; Добавим ещё один интересный модуль cstrike. В конечном счете у нас будет: &lt;br /&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;#include amxmodx &lt;br /&gt; #include amxmisc &lt;br /&gt; #include cstrike&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;p&gt; Функции модулей мы можем посмотреть на сайте amxmodx.org в разделе functions. А &lt;br /&gt; Любой плагин должен иметь функцию plugin_ init(). Всё то, что вставлено в эту данную функцию будет регистрироваться в AMX, что бы он мог использовать ваш плагинsmileyublic &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;plugin_init(&amp;#41; { &lt;br /&gt; register_plugin(&amp;#41;&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;br /&gt; Это сделает ваш плагин зарегистрированным. plugin_ init() берёт три параметра из плагина: это его название ( Pupkin Plugin), его версию (1.0) и автора ( Bac9|). Старайтесь не терять кавычек, иначе работать не будет. &lt;p&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;public plugin_init(&amp;#41; { &lt;br /&gt; register_plugin(PLUGIN, VERSION, AUTHOR&amp;#41; &lt;br /&gt; // Add your code here... &lt;br /&gt; }&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt; &lt;br /&gt; Что же делать дальше? &lt;p&gt; Дальше мы добавим в наш плагин команду, с помощью которой мы будем вызывать функцию. Добавим в public plugin_init() { &lt;br /&gt; следующую строчку для нашей цели. Должна быть команда которую админ сможет использовать и для этого мы должны её зарегистрировать в plugin_ init() функции. Команды, которые вводятся в консоле сервера или от клиента должны быть в нутрии plugin_ init() для того, что бы ею могли пользоваться. plugin_ init() важен по многим другим причинам. Функция plugin_ init() это как сообщение для AMXMod, что существует ваш плагин, и в случае чего (введение команды) юзать его.register_concmd(&quot;amx_pupkin&quot;,&quot;vasia&quot;,ADMIN_ALL,&quot;zapustit function vasia pupkin&quot;smiley &lt;br /&gt; Название плагина не должно быть очень большим, тогда данное название не подходит (amx_pupkin).Я назвал её так для простоты и непринуждённости прочтения текста. Следующий параметр – уровень доступа. Т.е. кто на сервере имеет права для выполнения данной команды. В данном случае админ ( ADMIN_ALL ). И последний параметр – это комментарий. Он будет отображен когда вы введёте (amx_pupkin). НЕ ТЕРЯЙТЕ КАВЫЧЕК!!! &lt;p&gt; &lt;!--uzcode--&gt;&lt;div class=&quot;bbCodeBlock&quot;&gt;&lt;div class=&quot;bbCodeName&quot; style=&quot;padding-left:5px;font-weight:bold;font-size:7pt&quot;&gt;Code&lt;/div&gt;&lt;div class=&quot;codeMessage&quot; style=&quot;border:1px inset;max-height:200px;overflow:auto;height:expression(this.scrollHeight&lt;5?this.style.height:scrollHeight&gt;200?&apos;200px&apos;:&apos;&apos;+(this.scrollHeight+5)+&apos;px&apos;);&quot;&gt;&lt;!--uzc--&gt;register_concmd(&quot;amx_pupkin&quot;,&quot;vasia&quot;,ADMIN_ALL,&quot;zapustit function vasia pupkin&quot;smiley&lt;!--/uzc--&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--/uzcode--&gt;</content:encoded>
			<category>AMXmodX</category>
			<dc:creator>El_zo0m</dc:creator>
			<guid>https://pro-log.clan.su/forum/7-7-1</guid>
		</item>
	</channel>
</rss>