OnClientColShapeHit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 2: Line 2:


__NOTOC__  
__NOTOC__  
This event is blahblah and is used for blahblah.
This event triggers whenever an element enters a collision shape.


==Syntax==  
==Syntax==  
Line 10: Line 10:


==Example==  
==Example==  
This example does...
This example outputs "In." to the chatbox whenever a local user enters a collision shape.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
function onClientColShapeHit( theEntity, matchingDimension )
blabhalbalhb --abababa
    if ( theEntity == getLocalPlayer() ) then  --Checks whether the entering entity is the local player
--This line does this...
        outputChatBox( "In." )  --Outputs.
mooo
    end
end
</syntaxhighlight>
</syntaxhighlight>

Revision as of 07:25, 14 June 2007


This event triggers whenever an element enters a collision shape.

Syntax

void onClientColShapeHit ( entity theEntity, bool matchingDimension )

Example

This example outputs "In." to the chatbox whenever a local user enters a collision shape.

function onClientColShapeHit( theEntity, matchingDimension )
    if ( theEntity == getLocalPlayer() ) then  --Checks whether the entering entity is the local player
        outputChatBox( "In." )  --Outputs.
    end
end