SetElementCollisionsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 14: Line 14:
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.


<section name="Server" class="server" show="false">
==Example==  
==Example==  
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:
Line 31: Line 32:
end
end
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Element_functions}}
{{Element_functions}}

Revision as of 11:47, 11 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.

Click to expand [+]
Server

See Also