Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- getMaterialCustomShaderFilename
- getMaterialCustomShaderVariation
- getMaterialDiffuseMapFilename
- getMaterialDiffuseMapHasAlpha
- getMaterialEmissiveMapFilename
- getMaterialEmissiveMapHasAlpha
- getMaterialGlossMapFilename
- getMaterialHasRefractionMap
- getMaterialIsAlphaBlended
- getMaterialIsAlphaTested
- getMaterialNormalMapFilename
- getMaterialNormalMapFormat
- getMaterialReflectionMapScaling
- setMaterialCustomMapFromFile
- setMaterialCustomShaderVariation
- setMaterialDiffuseMapFromFile
- setMaterialGlossMapFromFile
- setMaterialNormalMapFromFile
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
PlayerRequestStyleEvent
ParentEventFunctions
emptyNew
DescriptionCreate an empty instanceDefinition
emptyNew()Return Values
table | instance | Instance of object |
11 | function PlayerRequestStyleEvent.emptyNew() |
12 | local self = Event.new(PlayerRequestStyleEvent_mt) |
13 | return self |
14 | end |
new
DescriptionCreate an instanceDefinition
new()Code
18 | function PlayerRequestStyleEvent.new(playerObjectId) |
19 | local self = PlayerRequestStyleEvent.emptyNew() |
20 | |
21 | self.playerObjectId = playerObjectId |
22 | |
23 | return self |
24 | end |
readStream
DescriptionReads network streamDefinition
readStream(integer streamId, table connection)Arguments
integer | streamId | network stream identification |
table | connection | connection information |
38 | function PlayerRequestStyleEvent:readStream(streamId, connection) |
39 | self.playerObjectId = NetworkUtil.readNodeObjectId(streamId) |
40 | self.player = NetworkUtil.getObject(self.playerObjectId) |
41 | |
42 | self:run(connection) |
43 | end |
run
DescriptionRun eventDefinition
run(table connection)Arguments
table | connection | connection information |
48 | function PlayerRequestStyleEvent:run(connection) |
49 | if not connection:getIsServer() then --server side |
50 | local style = g_currentMission.playerInfoStorage:getPlayerStyle(self.player.userId) |
51 | connection:sendEvent(PlayerSetStyleEvent.new(self.player, style)) |
52 | end |
53 | end |
writeStream
DescriptionWrites network streamDefinition
writeStream(integer streamId, table connection)Arguments
integer | streamId | network stream identification |
table | connection | connection information |
30 | function PlayerRequestStyleEvent:writeStream(streamId, connection) |
31 | NetworkUtil.writeNodeObjectId(streamId, self.playerObjectId) |
32 | end |