Script v1.7.1.0
- AI
- Animals
- Contracts
- Debug
- Economy
- Effects
- Events
- Farms
- GUI
- Handtools
- I3d
- Materials
- Misc
- Objects
- Placeables
- Player
- Shop
- Sounds
- Specializations
- Triggers
- Utils
- Vehicles
- Weather
Engine v1.7.1.0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- General
- I3D
- Input
- Lighting
- Math
- Network
- streamGetNumOfUnreadBits
- streamGetReadOffset
- streamGetWriteOffset
- streamReadBool
- streamReadFloat32
- streamReadInt16
- streamReadInt32
- streamReadInt8
- streamReadIntN
- streamReadManualTimestamp
- streamReadString
- streamReadUInt16
- streamReadUInt8
- streamReadUIntN
- streamSetReadOffset
- streamSetWriteOffset
- streamWriteBool
- streamWriteFloat32
- streamWriteInt16
- streamWriteInt32
- streamWriteInt8
- streamWriteIntN
- streamWriteManualTimestamp
- streamWriteStream
- streamWriteString
- streamWriteUInt16
- streamWriteUInt8
- streamWriteUIntN
- Node
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- XML
- general
Foundation Reference
PlayerPermissionsEvent
ParentEventFunctions
sendEvent
DescriptionCreate an instanceDefinition
sendEvent(table player, integer farmId, bool noEventSend)Arguments
table | player | player instance |
integer | farmId | farm identification |
bool | noEventSend | if false will send the event |
88 | function PlayerPermissionsEvent.sendEvent(userId, permissions, isFarmManager, noEventSend) |
89 | if noEventSend == nil or noEventSend == false then |
90 | local event = PlayerPermissionsEvent:new(userId, permissions, isFarmManager) |
91 | |
92 | if g_server ~= nil then |
93 | local farm = g_farmManager:getFarmByUserId(userId) |
94 | local player = farm.userIdToPlayer[userId] |
95 | |
96 | g_server:broadcastEvent(event, nil, nil, player) |
97 | else |
98 | g_client:getServerConnection():sendEvent(event) |
99 | end |
100 | end |
101 | end |