<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK-скрипт для SA:MP]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=11617</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11617&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK-скрипт для SA:MP».]]></description>
		<lastBuildDate>Sat, 16 Jul 2016 17:04:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=106116#p106116</link>
			<description><![CDATA[<div class="codebox"><pre><code>#SingleInstance force
#NoEnv
#include SAMPMAXnew.ahk
#IfWinActive GTA:SA:MP
ListLines Off
SetBatchLines -1
SetKeyDelay 0
Chat := A_MyDocuments &quot;\GTA San Andreas User Files\SAMP\chatlog.txt&quot;
#Persistent
global TazerTo:= -1
global TazerIn := 0
global TazerOut:=0
Loop
{
TempWeapon := getPlayerWeaponId()
if (TempWeapon = 23) or(TempWeapon = 3)
	if not TazerIn
	{
		TazerIn := 1
		if TazerSleep
			SetTimer TakeGun, 100
		else
		SetTimer TakeGun, %SleepOn%
	}
	if (TempWeapon = 24) or (TempWeapon = 25) or (TempWeapon = 29) or (TempWeapon = 31) or (TempWeapon = 17) or (TempWeapon = 1) or (TempWeapon = 5) or (TempWeapon = 14) or (TempWeapon = 30) or (TempWeapon = 33) or (TempWeapon = 34) or (TempWeapon = 43) or (TempWeapon = 46) or (TempWeapon = 15) or (TempWeapon = 36) or (TempWeapon = 2)  {
		if not TazerIn
		{
			TazerIn := 1
			SetTimer TakeGun, %SleepOn%
		}
	}
	if (TempWeapon = 0)
	{
		if (TazerOut &gt; 1) and (TazerTo)
		{
			TazerTo := 0
			SetTimer UnloadGun, %SleepOff%
		}
	}
	Sleep 100
}
TakeGun:
TempWeapon := getPlayerWeaponId()
if (TempWeapon = 24) and (TazerOut != 2) {
     SendChat(&quot;/do Пистолет в кобуре.&quot;)
     SendChat(&quot;/me быстрым движением правой руки открыл&quot; Female &quot; кобуру и вытащил&quot; Female &quot; пистолет.&quot;)
     SendChat(&quot;/me снял&quot; Female &quot; пистолет с предохранителя.&quot;)
	TazerOut:=2
}
if (TempWeapon = 3) and (TazerOut != 3) {
        SendChat(&quot;/do Дубинка висит на поясе.&quot;)
	SendChat(&quot;/me резким движение снял&quot; Female &quot; дубинку с поясного держателя.&quot;)
	TazerOut:=3
}
if (TempWeapon = 23) and (TazerOut != 4) {
	SendChat(&quot;/me снял&quot; Female &quot; электрошокер с пояса&quot;)
	TazerOut:=4
}
if (TempWeapon = 25) and (TazerOut != 5) {
	SendChat(&quot;/me вытащил &quot; Female &quot; дробовик из-за спины&quot;)
        SendChat(&quot;/me снял&quot; Female &quot; дробовик с предохранителя&quot;)
	TazerOut:=5
}
if (TempWeapon = 29) and (TazerOut != 6) {
	SendChat(&quot;/me взял&quot; Female &quot; MP-5 в руки.&quot;)
	TazerOut:=6
}
if (TempWeapon = 31) and (TazerOut != 7) {
	SendChat(&quot;/me достал&quot; Female &quot; карабин M4 из-за плеча&quot;)
        SendChat(&quot;/me снял&quot; Female &quot; M4 с предохранителя&quot;)
	TazerOut:=7
}
if (TempWeapon = 17) and (TazerOut != 8) {
	SendChat(&quot;/me надел&quot; Female &quot; противогаз.&quot;)
	Sleep 2000
	SendChat(&quot;/me достал&quot; Female &quot; светошумовую гранату.&quot;)
	TazerOut:=8
}
if (TempWeapon = 1) and (TazerOut != 9) {
	SendChat(&quot;/me надел&quot; Female &quot; кастет на руку.&quot;)
	TazerOut:=9
}
if (TempWeapon = 5) and (TazerOut != 10) {
	SendChat(&quot;/me взял&quot; Female &quot; бейсбольную биту в руки.&quot;)
	TazerOut:=10
}
if (TempWeapon = 14) and (TazerOut != 11) {
	SendChat(&quot;/me развернул&quot; Female &quot; букет цветов.&quot;)
	TazerOut:=11
}
if (TempWeapon = 30) and (TazerOut != 12) {
	SendChat(&quot;/me взял&quot; Female &quot; автомат АК-47 в руки.&quot;)
	TazerOut:=12
}
if (TempWeapon = 33) and (TazerOut != 13) {
	SendChat(&quot;/me взял&quot; Female &quot; винтовку в руки.&quot;)
	TazerOut:=13
}
if (TempWeapon = 34) and (TazerOut != 14) {
	SendChat(&quot;/me достал&quot; Female &quot; снайперскую винтовку из-за плеча&quot;)
        SendChat(&quot;/me снял&quot; Female &quot; снайперскую винтовку с предохранителя&quot;)
	TazerOut:=14
}
if (TempWeapon = 43) and (TazerOut != 15) {
	SendChat(&quot;/me достал&quot; Female &quot; фотоаппарат.&quot;)
	TazerOut:=15
}
if (TempWeapon = 46) and (TazerOut != 16) {
	SendChat(&quot;/me одел&quot; Female &quot; парашют на плечи.&quot;)
	TazerOut:=16
}
if (TempWeapon = 15) and (TazerOut != 17) {
	SendChat(&quot;/me достал&quot; Female &quot; элегантную трость.&quot;)
	TazerOut:=17
}
if (TempWeapon = 36) and (TazerOut != 18) {
	SendChat(&quot;/me взял&quot; Female &quot; Stinger в руки.&quot;)
	TazerOut:=18
}
if (TempWeapon = 2) and (TazerOut != 19) {
	SendChat(&quot;/me взял&quot; Female &quot; клюшку в руки.&quot;)
	TazerOut:=19
}
TazerIn := 0
TazerTo := 1
SetTimer TakeGun, Off
return

UnloadGun:
TempWeapon := getPlayerWeaponId()
if not (TempWeapon = 24) and (TazerOut = 2)
{
            SendChat(&quot;/me поставил&quot; Female &quot; пистолет на предохранитель.&quot;)
            SendChat(&quot;/me быстрым движением руки засунул&quot; Female &quot; пистолет в кобуру и застегнул&quot; Female &quot; ее.&quot;)
}
if not (TempWeapon = 3) and (TazerOut = 3)
{
            SendChat(&quot;/me повесил&quot; Female &quot; дубинку на пояс.&quot;)
            SendChat(&quot;/do Дубинка на поясе.&quot;)
}
if not (TempWeapon = 23) and (TazerOut = 4)
{
SendChat(&quot;/me повесил&quot; Female &quot; электрошокер на пояс.&quot;)
}
if not (TempWeapon = 3) and (TazerOut = 5)
{
            SendChat(&quot;/me поставил&quot; Female &quot; дробовик на предохранитель&quot;)
            SendChat(&quot;/me повесил&quot; Female &quot; дробовик на плечо&quot;)
}
if not (TempWeapon = 3) and (TazerOut = 6)
{
SendChat(&quot;/me повесил&quot; Female &quot; MP-5 на плечо.&quot;)
}
if not (TempWeapon = 31) and (TazerOut = 7)
{
            SendChat(&quot;/me поставил&quot; Female &quot; М4 на предохранитель&quot;)
            SendChat(&quot;/me повесил&quot; Female &quot; M4 на плечо&quot;)
}
if not (TempWeapon = 1) and (TazerOut = 9)
{
SendChat(&quot;/me снял&quot; Female &quot; кастет.&quot;)
}
if not (TempWeapon = 5) and (TazerOut = 10)
{
SendChat(&quot;/me спрятал&quot; Female &quot; биту.&quot;)
}
if not (TempWeapon = 14) and (TazerOut = 11)
{
SendChat(&quot;/do Цветы не в руках.&quot;)
}
if not (TempWeapon = 30) and (TazerOut = 12)
{
SendChat(&quot;/me убрал&quot; Female &quot; АК-47 за спину.&quot;)
}
if not (TempWeapon = 33) and (TazerOut = 13)
{
SendChat(&quot;/me убрал&quot; Female &quot; винтовку.&quot;)
}
if not (TempWeapon = 34) and (TazerOut = 14)
{
            SendChat(&quot;/me поставил&quot; Female &quot; снайперскую винтовку на предохранитель&quot;)
            SendChat(&quot;/me повесил&quot; Female &quot; снайперскую винтовку на плечо&quot;)
}
if not (TempWeapon = 43) and (TazerOut = 15)
{
SendChat(&quot;/me закрыл&quot; Female &quot; крышечкой объектив фотоаппарата.&quot;)
}
if not (TempWeapon = 46) and (TazerOut = 16)
{
SendChat(&quot;/me снял&quot; Female &quot; парашют.&quot;)
}
TazerOut:=0
SetTimer UnloadGun, Off
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Pavlik111222)]]></author>
			<pubDate>Sat, 16 Jul 2016 17:04:18 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=106116#p106116</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104158#p104158</link>
			<description><![CDATA[<div class="quotebox"><cite>tawer31rus пишет:</cite><blockquote><p>Это все долго) Надо прямо чтобы я поменял оружия, и сразу же пошла отыгровка.<strong>Dworkin</strong></p></blockquote></div><p>ну вместо кнопки Z ставишь цикл и все.</p>]]></description>
			<author><![CDATA[null@example.com (Dworkin)]]></author>
			<pubDate>Tue, 24 May 2016 08:33:01 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104158#p104158</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104062#p104062</link>
			<description><![CDATA[<p>Это все долго) Надо прямо чтобы я поменял оружия, и сразу же пошла отыгровка.<strong>Dworkin</strong></p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 19:07:46 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104062#p104062</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104061#p104061</link>
			<description><![CDATA[<p>Тут надо работать с памятью игры(тоесть считывать адресс) либо использовать функцию из samp UDF, которая определяет ид оружия в руке(вроде в каком-то UDF видел). А далее в зависимости от ида в руке уже пишет то что тебе надо в чат. Что бы писало в чат тоже используй функции UDF.<br />Какой ид относится к оружию можешь найти в интернете.<br />Если будешь сам считывать память то вот тебе адрес. Считывать надо в 1 byte то есть в Char. Он показывает ид оружия в руке:<br /></p><div class="codebox"><pre><code>0xB6F5F0(основной адрес) + 0x740(оффсет)</code></pre></div><p>Я бы сделал код примерно в такой логике:<br />Выбрал оружие(пока ничего не происходит это делаешь руками). Далее вступает в действие скрипт.<br />Жмешь например Z. Скрипт считывает ид оружия. Далее в зависимости от условия пишет в чат.</p>]]></description>
			<author><![CDATA[null@example.com (Dworkin)]]></author>
			<pubDate>Sun, 22 May 2016 18:48:26 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104061#p104061</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104055#p104055</link>
			<description><![CDATA[<p><strong>SeaVodikendu</strong></p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 16:34:50 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104055#p104055</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104054#p104054</link>
			<description><![CDATA[<p><strong>SeaVodikendu</strong> Вот этот AHK. Где есть эта смена оружия. Взломать у меня не получилось)</p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 16:33:07 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104054#p104054</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104053#p104053</link>
			<description><![CDATA[<p>Я не знаю, записывает ли игра логи в файл, о том какое оружие в руках. Тогда можно было бы сделать как ты хочешь. Но это навряд ли.<br />Еще такой вариант:<br />При нажатии хоткея будет всплывать окно с выбором оружия (какое имеется в арсенале). И тогда при прокрутки колеса мыши, оно будет меняться и соответствующая отыгровка к нему.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Sun, 22 May 2016 16:09:45 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104053#p104053</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104052#p104052</link>
			<description><![CDATA[<p>Нет. Я щелкаю колесиком мыши. И это не зависит, а если будет 2 оружия, как тогда?<strong>SeaVodikendu</strong></p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 15:31:07 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104052#p104052</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104048#p104048</link>
			<description><![CDATA[<p><strong>tawer31rus</strong><br />Но ты ведь нажимаешь клавишу, когда меняешь оружие. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />На этом принципе и строится код.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Sun, 22 May 2016 11:06:29 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104048#p104048</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104047#p104047</link>
			<description><![CDATA[<p>Нет. Это не то..<br />Надо что бы я не нажимал клавиши... а он автомотически это делал, когда я менял оружия.<strong>SeaVodikendu</strong></p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 10:01:02 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104047#p104047</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104046#p104046</link>
			<description><![CDATA[<p>Благодарю. Держи +<strong>SeaVodikendu</strong></p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 09:52:44 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104046#p104046</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104045#p104045</link>
			<description><![CDATA[<p>К примеру:<br /></p><div class="codebox"><pre><code>
2::
sendinput, {vk32}
sleep 500
sendinput, {f6}/me Достал из кобуры Deagle{enter}
return</code></pre></div><p>&quot;2&quot; - горячая клавиша для смены &quot;с кулака на Deagle&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Sun, 22 May 2016 09:37:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104045#p104045</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104044#p104044</link>
			<description><![CDATA[<p><strong>SeaVodikendu</strong> Сам код я незнаю. А под себя я сам смогу сделать)</p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 08:21:33 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104044#p104044</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104043#p104043</link>
			<description><![CDATA[<p><strong>SeaVodikendu</strong> Хотя бы код с кулака на Deagle, и что бы была отыгровка.</p>]]></description>
			<author><![CDATA[null@example.com (tawer31rus)]]></author>
			<pubDate>Sun, 22 May 2016 08:19:17 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104043#p104043</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK-скрипт для SA:MP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104041#p104041</link>
			<description><![CDATA[<p>Вариантов много как сделать. На какие кнопки оружие меняешь?</p>]]></description>
			<author><![CDATA[null@example.com (SeaVodikendu)]]></author>
			<pubDate>Sun, 22 May 2016 04:59:36 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104041#p104041</guid>
		</item>
	</channel>
</rss>
