getElementCollisionsEnabled | Multi Theft Auto: Wiki Skip to content

getElementCollisionsEnabled

Client-side
Server-side
Shared

Pair: setElementCollisionsEnabled

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function indicates if a specific element is set to have collisions disabled. An element without collisions does not interact with the physical environment and remains static.

Syntax

getElementCollisionsEnabled ( )

Code Examples

server

This example check if there are any players with collisions disabled.

for _,player in ipairs( getElementsByType( "player" ) ) do
if not getElementCollisionsEnabled( player ) then -- If we get a false return from the function, we know that the collisions are disabled.
outputConsole( "Player " .. getPlayerName( player ) .. " has collisions disabled." )
end
end

See Also

Element Functions