element.id: Difference between revisions
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
|usage = fetch the integer ID of the element | |usage = fetch the integer ID of the element | ||
|returnInfo = the integer ID of the element | |returnInfo = the integer ID of the element | ||
|notes = All elements ''share the same ID pool''. For example, ID 1 could be a vehicle, ID 2 a player ped, ID 3 an object, ID 4 another vehicle, and so on.<br | |notes = All elements ''share the same ID pool''. For example, ID 1 could be a vehicle, ID 2 a player ped, ID 3 an object, ID 4 another vehicle, and so on. <br> | ||
The ''ID's are not recycled''. For example, if you spawn 5 vehicles which are assigned ID's 1 through 5, then remove ID 3, the next element to be spawned will get an ID of 6 (not 3).<br | The ''ID's are not recycled''. For example, if you spawn 5 vehicles which are assigned ID's 1 through 5, then remove ID 3, the next element to be spawned will get an ID of 6 (not 3). <br> | ||
Do not confuse this ID with [[client.index|client.index]], which is a separate pool of ID's. Also client is NOT a player ped as you would expect from other multiplayer mods. See [[ClientsAndPlayers|this page]] for more information on that. | Do not confuse this ID with [[client.index|client.index]], which is a separate pool of ID's. Also client is NOT a player ped as you would expect from other multiplayer mods. See [[ClientsAndPlayers|this page]] for more information on that. | ||
}} | }} |
Latest revision as of 03:07, 19 October 2025
Property
Server and Client
Online and Offline
Read-Only
int element.id
Value
int | The integer ID of the element. |
readonly | This property cannot be changed. |
Types
Shared
BlipShared
BuildingShared
ElementShared
EntityShared
MarkerShared
ObjectShared
PedShared
PhysicalShared
PlayerShared
Vehicle
Notes
- All elements share the same ID pool. For example, ID 1 could be a vehicle, ID 2 a player ped, ID 3 an object, ID 4 another vehicle, and so on. .
- The ID's are not recycled. For example, if you spawn 5 vehicles which are assigned ID's 1 through 5, then remove ID 3, the next element to be spawned will get an ID of 6 (not 3). .
- Do not confuse this ID with client.index, which is a separate pool of ID's. Also client is NOT a player ped as you would expect from other multiplayer mods. See this page for more information on that.
Examples
There aren't any examples for this property.
Compatibility
There isn't any compatibility information for this property.
Related
Server Related
destroyElement
getElementCount
getElementFromId
getElementFromName
getElements
getElementsByType
element.children
element.clearExistsFor
element.dimension
element.existsFor
element.getData
element.getRotation
element.id
element.isCreatedFor
element.isLocal
element.isOwner
element.isSyncer
element.isType
element.name
element.netFlags
element.parent
element.position
element.removeAllData
element.removeData
element.resource
element.rotation
element.setData
element.setExistsFor
element.setRotation
element.setSyncer
element.streamInDistance
element.streamOutDistance
element.syncer
element.syncerId
element.type
Client Related
destroyElement
getElementCount
getElementFromId
getElementFromName
getElements
getElementsByType
element.children
element.clearExistsFor
element.dimension
element.existsFor
element.getData
element.getRotation
element.id
element.isCreatedFor
element.isLocal
element.isOwner
element.isSyncer
element.isType
element.name
element.netFlags
element.parent
element.position
element.removeAllData
element.removeData
element.resource
element.rotation
element.setData
element.setExistsFor
element.setRotation
element.setSyncer
element.streamInDistance
element.streamOutDistance
element.syncer
element.syncerId
element.type