SetElementCollisionsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Server only -> client only)
Line 1: Line 1:
{{Server function}}  
{{Client function}}  
__NOTOC__  
__NOTOC__  
This function can disable or enable an element's collisions. An element without collisions does not interact with the physical environment and remains static.
This function can disable or enable an element's collisions. An element without collisions does not interact with the physical environment and remains static.
Line 16: Line 16:


==Example==  
==Example==  
<section name="Server" class="server" show="false">
<section name="Client" class="client" show="false">
This example enables collisions for all vehicles within a certain radius of a player:
This example enables collisions for all vehicles within a certain radius of a player:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 03:24, 13 August 2007

This function can disable or enable an element's collisions. An element without collisions does not interact with the physical environment and remains static.

Syntax

bool setElementCollisionsEnabled ( element theElement, bool enabled ) 

Required Arguments

  • theElement: The element you wish to set the collisions of
  • enabled: A boolean to indicate whether collisions are enabled (true) or disabled (false)

Returns

Returns true if the collisions were set succesfully, false otherwise.

Example

Click to expand [+]
Client

See Also