MTA:Eir/functions/createBuilding: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ This function creates a building. A building is a special type of object that does not have physical properties itself. It is lightweight rendering and collidable ...")
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
This function creates a building. A building is a special type of [[object]] that does not have physical properties itself. It is lightweight rendering and collidable instance on the GTA:SA world.
This function creates a building. A building is a special type of [[object]] that does not have physical properties itself. It is lightweight rendering and collidable instance on the GTA:SA world. As opposed to Objects, buildings do not stream. They can have an infinite drawing distance.


This function is part of the discussion: '''shall buildings be made MTA entities?'''
This function is part of the discussion: '''[[Talk:MTA:Eir/functions/createBuilding|shall buildings be made MTA entities?]]'''


==Syntax==  
==Syntax==  

Latest revision as of 01:52, 12 January 2014

This function creates a building. A building is a special type of object that does not have physical properties itself. It is lightweight rendering and collidable instance on the GTA:SA world. As opposed to Objects, buildings do not stream. They can have an infinite drawing distance.

This function is part of the discussion: shall buildings be made MTA entities?

Syntax

building createBuilding ( int model, float x, float y, float z )

Arguments

  • model: the atomic model info index to use with this model
  • x, y, z: position vector on the GTA:SA world

Returns

Returns a building instance if successfully created, false otherwise.

Example

Click to collapse [-]
Client

This snippet creates a random building instance and warps the local player to it.

local myBuilding = createBuilding( 3376, 0, 0, 10 );
setElementPosition( localPlayer, 0, 0, 12 );