<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Проблема с UDF - getPlayerIdByName()]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14480&amp;type=atom" />
	<updated>2019-01-09T21:59:02Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14480</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130935#p130935" />
			<content type="html"><![CDATA[<p>Точно так же как и getusername(). Просто воспользуйтесь ею так же, как будто вы пытаетесь получить свое имя, только вместо имени будет ваш ID.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-01-09T21:59:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130935#p130935</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130933#p130933" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Будь добр, подскажи как её (функцию getId()) вставить в мой код так, чтобы она была рабочая.<br />Заранее спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Purple]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39723</uri>
			</author>
			<updated>2019-01-09T20:52:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130933#p130933</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130931#p130931" />
			<content type="html"><![CDATA[<p>В вашем UDF должна быть ещё функция getid() или что-то такое, она возвращает именно ваш ID, а не ID того, чье имя вы укажете. Попробуйте её.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-01-09T19:46:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130931#p130931</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130930#p130930" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong></p><p>Менял местами..</p><div class="codebox"><pre><code>#Include UDF.ahk
#IfWinActive GTA:SA:MP

mynickname:=GetUserName()
myplayerid:=GetPlayerIdByName(mynickname)

:?:/dg 5::
SendMessage, 0x50,, 0x4190419,, A
Sleep, 100
SendInPut, {F6}/sellgun Deagle 5 10 %myplayerid%{Enter}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Purple]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39723</uri>
			</author>
			<updated>2019-01-09T19:41:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130930#p130930</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130929#p130929" />
			<content type="html"><![CDATA[<p>А что делали то?</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-01-09T19:37:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130929#p130929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130928#p130928" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong><br />Уже делал, но всё равно пишет вместо моего &quot;id&quot; - &quot;-1&quot;. <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Purple]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39723</uri>
			</author>
			<updated>2019-01-09T19:22:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130928#p130928</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130927#p130927" />
			<content type="html"><![CDATA[<p>Попробуем почитать построчно. Строчки номер 1-2: какие-то служебные команды, строчка три пустая. Строчка четыре значит взять ID у игрока имя которого хранится в переменной nickname. Следующая строчка: в переменную nickname записывается Ваше имя. Дальше нам не нужно. <br />По секрету, скрипты выполняются сверху вниз, теперь догадаетесь в чем проблема <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />?</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-01-09T18:15:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130927#p130927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130925#p130925" />
			<content type="html"><![CDATA[<p>Для вопросов по играм есть отдельная ветка.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-01-09T14:08:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130925#p130925</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Проблема с UDF - getPlayerIdByName()]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=130924#p130924" />
			<content type="html"><![CDATA[<p>Сделал код сокращения команды для создания Дигла.<br />&#039;getUserName()&#039; в игре работает отлично, а вот &#039;getPlayerIdByName()&#039;, мягко говоря, не очень...<br />При вводе команды &#039;/dg 5&#039; в чат вставляется &#039;/sellgun Deagle 5 10 -1&#039;</p><p>UDF находится в той же папке, что и скрипт.<br />Компилирую с помощью AHK2exe, в <span class="bbu">v1.1.30.1 ANSI 32-bit</span>. (менял на <span class="bbu">v1.1.30.1 Unicode 32-bit</span> и <span class="bbu">v1.1.30.1 Unicode 64-bit</span> - 0 реакции)</p><div class="codebox"><pre><code>#Include UDF.ahk
#IfWinActive GTA:SA:MP

myplayerid:=GetPlayerIdByName(mynickname)
mynickname:=GetUserName()

:?:/dg 5::
SendMessage, 0x50,, 0x4190419,, A
Sleep, 100
SendInPut, {F6}/sellgun Deagle 5 10 %myplayerid%{Enter}
Return</code></pre></div><p>Может кто знает как исправить?<br />Заранее спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Purple]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39723</uri>
			</author>
			<updated>2019-01-09T14:05:04Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=130924#p130924</id>
		</entry>
</feed>
