<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/PT-BR/onClientColShapeHit?action=history&amp;feed=atom</id>
	<title>PT-BR/onClientColShapeHit - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/PT-BR/onClientColShapeHit?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/onClientColShapeHit&amp;action=history"/>
	<updated>2026-05-11T09:28:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/onClientColShapeHit&amp;diff=69428&amp;oldid=prev</id>
		<title>HiroShi: Página traduzida em PT-BR</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/onClientColShapeHit&amp;diff=69428&amp;oldid=prev"/>
		<updated>2021-02-24T12:53:08Z</updated>

		<summary type="html">&lt;p&gt;Página traduzida em PT-BR&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Este evento é acionado quando um [[element]] físico atinge um [[colshape]].&lt;br /&gt;
{{Note|O evento não será acionado se o [[element]] que entrou no colshape for também um colshape.}}&lt;br /&gt;
&lt;br /&gt;
==Parâmetros==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element theElement, bool matchingDimension&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theElement:''' O [[element]] que entrou no [[colshape]].&lt;br /&gt;
*'''matchingDimension:''' Um [[boolean]] que representa se o [[element]] está na mesma [[dimension]] que o [[colshape]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
A source deste evento é o [[colshape]] que foi atingida fisicamente.&lt;br /&gt;
&lt;br /&gt;
==Exemplo== &lt;br /&gt;
Este exemplo enviará um mensagem ('entrou!') no chat assim que o evento for acionado..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onClientColShapeHit( theElement, matchingDimension )&lt;br /&gt;
    if ( theElement == localPlayer ) then  -- Verificará se o elemento que entrou no colshape é o player que acionou.&lt;br /&gt;
        outputChatBox( &amp;quot;entrou!&amp;quot; )  -- Mandará um mensagem no chat do jogo.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientColShapeHit&amp;quot;, root, onClientColShapeHit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Este exemplo enviará um mensagem no chat do jogo, se o usuário estiver na mesma dimensão que a [[colshape]] ou não..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
myZone = createColSphere (2490, -1668, 12.5, 25) -- Cria um colshape.&lt;br /&gt;
&lt;br /&gt;
function dimensionChecker (theElement, matchingDimension)&lt;br /&gt;
    if matchingDimension then -- Verifica se o elemento que acionou o evento, está na mesma dimensão que o colshape.&lt;br /&gt;
        outputChatBox (&amp;quot;O elemento está na mesma dimensão da colshape!&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox (&amp;quot;O elemento não está na mesma dimensão da colshape!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onClientColShapeHit&amp;quot;, myZone, dimensionChecker)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[pl:onClientColShapeHit]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client colshape events===&lt;br /&gt;
{{Client_colshape_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>HiroShi</name></author>
	</entry>
</feed>