GetElementRadius

From Multi Theft Auto: Wiki
Revision as of 10:23, 24 May 2010 by Extrike (talk | contribs)
Jump to navigation Jump to search

This function gets the radius from a element.

Syntax

float getElementRadius ( element theElement )

Required Arguments

  • theElement: The element.

Returns

Returns float as radius, false otherwise.

Example

Click to collapse [-]
Client

Example of how to derive the radius of a player:

function myCommandHandler(source, command)
	local myradius = getElementRadius ( source )
	if (myradius) then
		outputChatBox("Radius of my player is: " .. myradius)
	else
		outputChatBox("Error")
	end	
end

addCommandHandler("getmyradius", myCommandHandler)

See Also