GetElementInterior

From Multi Theft Auto: Wiki
Revision as of 21:29, 28 July 2007 by Driver2 (talk | contribs)
Jump to navigation Jump to search

This function allows you to retrieve the interior of any element. An interior is the current loaded place, 0 being outside.

Syntax

int getElementInterior ( element theElement )

Required Arguments

  • theElement: The element in which you'd like to retrieve the interior of.

Returns

Returns an integer for the interior if 'theElement' is valid, false otherwise.

Example

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

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

See Also