getElementInterior | Multi Theft Auto: Wiki Skip to content

getElementInterior

Client-side
Server-side
Shared

Pair: setElementInterior

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 allows you to retrieve the interior of any element. An interior is the current loaded place, 0 being outside.

Syntax

getElementInterior ( )

Code Examples

server

This example shows a player if he is outside or not, when he enters the command 'AmIOutside'.

function AmIOutside ( thePlayer, command )
if ( getElementInterior(thePlayer) == 0 ) then
outputChatBox ( "Yes you are outside " .. getPlayerName(thePlayer), thePlayer )
else
outputChatBox ( "No you aren't outside " .. getPlayerName(thePlayer), thePlayer )
end
end
addCommandHandler ( "AmIOutside", AmIOutside )

See Also

Element Functions