element.setData: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
|class = Element | |class = Element | ||
|name = setData | |name = setData | ||
| | |parametersSS = string dataName, var theData, bool syncWithClients = true | ||
|parametersCS = string dataName, var theData | |||
|parameter1 = string dataName The string name of the data for the element. | |parameter1 = string dataName The string name of the data for the element. | ||
|parameter2 = var theData The data for the element, which is referenced by dataName. | |parameter2 = var theData The data for the element, which is referenced by dataName. | ||
|parameter3 = bool syncWithClients Whether to | |parameter3 = bool syncWithClients Whether '''dataName''' and '''theData''' are sent to all clients. This only applies when the method is used server-side. | ||
|returnTypes = void | |returnTypes = void | ||
|returnInfo = void | |returnInfo = void |
Revision as of 12:02, 27 April 2022
Method
Server and Client
Online and Offline
Server: | void element.setData(string dataName, var theData, bool syncWithClients = true) |
Client: | void element.setData(string dataName, var theData) |
Parameters
1) | string | dataName | The string name of the data for the element. |
2) | var | theData | The data for the element, which is referenced by dataName. |
3) | bool | syncWithClients | Whether dataName and theData are sent to all clients. This only applies when the method is used server-side. |
Return
void | This method doesn't return a value. |
Types
Shared
BlipShared
BuildingShared
ElementShared
EntityShared
MarkerShared
ObjectShared
PedShared
PhysicalShared
PlayerShared
Vehicle
Notes
- The third arg (syncWithClients) is not available client side.
Examples
There aren't any examples for this method.
Compatibility
There isn't any compatibility information for this method.
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