DCS hook onPlayerConnect
From DCS World Wiki - Hoggitworld.com
Envrioment: | Server | ||
Function: | onPlayerConnect | Added with: 2.5.0 | |
Member Of: | hook | ||
Syntax: | nothing hook.onPlayerConnect(number id ) | ||
Description: | Occurs when a player connects to a server. Passed id value is a simple unique identifier that is used with network functions to get other information about that player or actions like kicking them from the server.
| ||
Return Value: | nothing | ||
Return Actions: | |||
Examples: | Adds client info to a table named clients.
clients = {} function myCall.onPlayerConnect(id) clients[id] = {id = id, addr = net.get_player_info(id, 'ipaddr'), name = net.get_player_info(id, 'name'), ucid = net.get_player_info(id, 'ucid'), ip = net.get_player_info(id, 'ipaddr')} end | ||
Related Functions: | List of Callbacks: onMissionLoadBegin, onMissionLoadProgress, onMissionLoadEnd, onSimulationStart, onSimulationStop, onSimulationFrame, onSimulationPause, onSimulationResume, onGameEvent, onNetConnect, onNetMissionChanged, onNetConnect, onNetDisconnect, onPlayerConnect, onPlayerDisconnect, onPlayerStart, onPlayerStop, onPlayerChangeSlot, onPlayerTryConnect, onPlayerTrySendChat, onPlayerTryChangeSlot | ||
Notes: |