element.type: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
m (Mex moved page Element.type to element.type)
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
|returnTypes = int
|returnTypes = int
|readonly = true
|readonly = true
|usage = fetch the [[Shared/Defines/ElementTypes|type]] of the element
|usage = fetch an int containing all [[Shared/Defines/ElementTypes|type]]'s for the element, that is, the derived type along with all base types too.<br>To check if an element is of any one specific type, use [[element.isType|element.isType]] along with an ELEMENT_* define.<br>Even if the type is derived, mods etc may add a class that extends the game's most derived type, and thus [[element.isType|element.isType]] is still preferred.
|returnInfo = the [[Shared/Defines/ElementTypes|type]] of the element
|returnInfo = an int containing the [[Shared/Defines/ElementTypes|type]]'s of the element
}}
}}

Latest revision as of 23:35, 5 January 2023

Property Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline Read-Only

Available since Server 1.0.0, Client 1.0.0

int element.type

The element.type property is used to fetch an int containing all type's for the element, that is, the derived type along with all base types too.
To check if an element is of any one specific type, use element.isType along with an ELEMENT_* define.
Even if the type is derived, mods etc may add a class that extends the game's most derived type, and thus element.isType is still preferred.

Value

int An int containing the type's of the element.
readonly This property cannot be changed.

Types

Shared Blip
Shared Building
Shared Element
Shared Entity
Shared Marker
Shared Object
Shared Ped
Shared Physical
Shared Player
Shared Vehicle

Notes

There aren't any notes for this property.

Examples

There aren't any examples for this property.

Compatibility

There isn't any compatibility information for this property.

Related

Server Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png destroyElement
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementCount
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementFromId
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementFromName
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElements
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementsByType

icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.children
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.clearExistsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.dimension
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.existsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.getData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.getRotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.id
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isCreatedFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isLocal
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isOwner
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isSyncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isType
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.name
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.netFlags
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.parent
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.position
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.removeAllData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.removeData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.resource
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.rotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setExistsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setRotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setSyncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.streamInDistance
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.streamOutDistance
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.syncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.syncerId
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.type


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png destroyElement
icon-iii.png icon-vc.png icon-sa.png getElementCount
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementFromId
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementFromName
icon-iii.png icon-vc.png icon-sa.png getElements
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getElementsByType

icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.children
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.clearExistsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.dimension
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.existsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.getData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.getRotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.id
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isCreatedFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isLocal
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isOwner
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isSyncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.isType
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.name
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.netFlags
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.parent
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.position
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.removeAllData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.removeData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.resource
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.rotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setData
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setExistsFor
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setRotation
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.setSyncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.streamInDistance
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.streamOutDistance
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.syncer
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.syncerId
icon-iii.png icon-vc.png icon-sa.png icon-iv.png element.type