<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; Дополнительный параметр в addMessageToChatWindow]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=11673</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11673&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Дополнительный параметр в addMessageToChatWindow».]]></description>
		<lastBuildDate>Thu, 23 Jun 2016 16:15:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Дополнительный параметр в addMessageToChatWindow]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=105484#p105484</link>
			<description><![CDATA[<div class="codebox"><pre><code>HexToDec(str)
{   
    local newStr := &quot;&quot;
    static comp := {0:0, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, &quot;a&quot;:10, &quot;b&quot;:11, &quot;c&quot;:12, &quot;d&quot;:13, &quot;e&quot;:14, &quot;f&quot;:15}
    StringLower, str, str
    str := RegExReplace(str, &quot;^0x|[^a-f0-9]+&quot;, &quot;&quot;)
    Loop, % StrLen(str)
        newStr .= SubStr(str, (StrLen(str)-A_Index)+1, 1)
    newStr := StrSplit(newStr, &quot;&quot;)
    local ret := 0
    for i,char in newStr
        ret += comp[char]*(16**(i-1))
    return ret
}
addMessageToChatWindow2(Color, wText) {
    wText := &quot;&quot; wText

    if(!checkHandles())
        return false
    
    VarSetCapacity(data2, 4, 0)
    NumPut(HexToDec(Color),data2,0,&quot;Int&quot;)
    VarSetCapacity(data1, 4, 0)
    NumPut(4289316068,data1,0,&quot;Int&quot;) 
    dwFunc := dwSAMP + FUNC_SAMP_ADDTOCHATWND
    Addrr := readDWORD(hGTA, dwSAMP+ADDR_SAMP_CHATMSG_PTR)
    WriteRaw(hGTA, Addrr + 0x12A, &amp;data2, 4)
    dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
    if(ErrorLevel) {
        ErrorLevel := ERROR_READ_MEMORY
        return false
    }
    
    callWithParams(hGTA, dwFunc, [[&quot;p&quot;, dwChatInfo], [&quot;s&quot;, wText]], true)
    ErrorLevel := ERROR_OK
    WriteRaw(hGTA, Addrr + 0x12A, &amp;data1, 4)
    return true
}</code></pre></div><div class="codebox"><pre><code>addMessageToChatWindow2(&quot;FFFFFF&quot;, &quot;Hello my {FFD700}FRIENDS{FFFFFF}!&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alekksss)]]></author>
			<pubDate>Thu, 23 Jun 2016 16:15:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=105484#p105484</guid>
		</item>
		<item>
			<title><![CDATA[Re: Дополнительный параметр в addMessageToChatWindow]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104720#p104720</link>
			<description><![CDATA[<p><strong>ghost29</strong> для особо умных говорю, нужно чтобы цвет задавался в параметре и изменял цвет всего сообщения, т.е. и /timestamp.</p>]]></description>
			<author><![CDATA[null@example.com (alekksss)]]></author>
			<pubDate>Sun, 05 Jun 2016 10:34:39 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104720#p104720</guid>
		</item>
		<item>
			<title><![CDATA[Re: Дополнительный параметр в addMessageToChatWindow]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104719#p104719</link>
			<description><![CDATA[<div class="codebox"><pre><code>addChatMessage(wText) {
    wText := &quot;&quot; wText

    if(!checkHandles())
        return false
    
    dwFunc := dwSAMP + FUNC_SAMP_ADDTOCHATWND
    dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
    if(ErrorLevel) {
        ErrorLevel := ERROR_READ_MEMORY
        return false
    }
    
    callWithParams(hGTA, dwFunc, [[&quot;p&quot;, dwChatInfo], [&quot;s&quot;, wText]], true)
    
    ErrorLevel := ERROR_OK
    return true
}</code></pre></div><p>Затем просто делаешь так<br /></p><div class="codebox"><pre><code>addChatMessage(&quot;{AFEEEE}asd!&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ghost29)]]></author>
			<pubDate>Sun, 05 Jun 2016 09:52:01 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104719#p104719</guid>
		</item>
		<item>
			<title><![CDATA[Дополнительный параметр в addMessageToChatWindow]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=104677#p104677</link>
			<description><![CDATA[<p>Приветствую мастера.<br />Нужно в фунцию добавить цвет сообщения, знаю что такое возможно, но каким образом не понимаю, пробывал добавить параметр, двигать его, ничего не выходит, либо не выводит сообщение, либо системного цвета. Помогите.<br /></p><div class="codebox"><pre><code>
addMessageToChatWindow2(Color, wText) {
    wText := &quot;&quot; wText

    if(!checkHandles())
        return false
    
    dwFunc := dwSAMP + FUNC_SAMP_ADDTOCHATWND
    dwChatInfo := readDWORD(hGTA, dwSAMP + ADDR_SAMP_CHATMSG_PTR)
    if(ErrorLevel) {
        ErrorLevel := ERROR_READ_MEMORY
        return false
    }
    
    callWithParams(hGTA, dwFunc, [[&quot;p&quot;, dwChatInfo], [&quot;s&quot;, wText], [&quot;i&quot;, Color]], true)
    
    ErrorLevel := ERROR_OK
    return true
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alekksss)]]></author>
			<pubDate>Sat, 04 Jun 2016 12:20:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=104677#p104677</guid>
		</item>
	</channel>
</rss>
