MTA:Eir/functions/createBuilding: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
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 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 [-]
ClientThis 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 );