From Multi Theft Auto: Wiki
Jump to: navigation, search

This function returns the visible size of an object.


float, float, float getObjectScale ( object theObject )

OOP Syntax Help! I don't understand this!

Method: object:getScale(...)
Variable: .scale
Counterpart: setObjectScale

Required Arguments

  • theObject: the object you wish to return the scale of.


  • Three float values indicating the scale of the object on the x, y, and z axis, if successful.
  • false otherwise.


Click to collapse [-]

This example adds a command get_scale which create object and prints out a scale of the object.

addCommandHandler( 'get_scale',
	function( )
		local uObject = createObject( 1337, getElementPosition( localPlayer ) )
		local x, y, z = getObjectScale( uObject )
		outputChatBox( "Object scale on X axis: "..x.." on Y axis: "..y.." on Z axis: "..z )

See Also