GetLocation

GetLocation(object)
Gets the location of an object.

location GetLocation(    object oObject );

Parameters
object oObject
 * The object to get the location of.

Description
Returns the location of the object passed. The object can be any valid object.

Note: A location is made up of a vector position (X, Y, Z), an area (object) and facing (0-360 degrees). All can be got by the different functions, GetFacingFromLocation, GetAreaFromLocation, and GetPositionFromLocation.

Remarks
An invalid object will still return a location, of a sort. As you cannot compare a return value from this to, say, LOCATION_INVALID, you must use either an always valid object, or use GetAreaFromLocation and check that it is indeed valid.

Caveats
There is a problem with GetLocation with a player character object (PC) during the OnClientLeave event.

Version
1.62