Dgs3DImageIsAttached

From Multi Theft Auto: Wiki
Revision as of 22:18, 11 August 2022 by TFv10 (talk | contribs) (Created page with "{{Server client function}} __NOTOC__ <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> This functions checks whether or not an element is attached to another element. ==Syntax== <!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and preve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This functions checks whether or not an element is attached to another element.

Syntax

bool isElementAttached ( element theElement )

OOP Syntax Help! I don't understand this!

Method: element:isAttached(...)
Variable: .attached


Required Arguments

  • theElement: The element to check for attachment.

Returns

Returns true if the specified element is attached to another element, false if it is not attached or nil if an improper argument was passed.

Example

This example is making export function to check weather the player is talking or not:

function isPlayerTalking(player)
	local player = player or localPlayer;
	return dgs:dgs3DImageIsAttached(icons[player]);
end 

See Also