Difference between revisions of "DCS func get player info"

From DCS World Wiki - Hoggitworld.com
 
Line 7: Line 7:
 
|par1= [[DCS_singleton_net|net]]
 
|par1= [[DCS_singleton_net|net]]
  
|par2=  
+
|par2= [[DCS_server_gameGUI|net (server)]]
  
 
|par3=  
 
|par3=  

Revision as of 22:49, 17 September 2021


Environment: Server
Function: get_player_info Added with: 2.5.0
Member Of: net, net (server)
Syntax: table net.get_player_info(number playerID , string attribute)
Description: Returns a table of attributes for a given playerId. If optional attribute present only that value is returned.

Attributes:

 'id'    : playerID
 'name'  : player name
 'side'  : 0 - spectators, 1 - red, 2 - blue
 'slot'  : slotID of the player or 
 'ping'  : ping of the player in ms
 'ipaddr': IP address of the player, SERVER ONLY
 'ucid'  : Unique Client Identifier, SERVER ONLY


Return Value: table
Return Example:
Examples:
Related Functions: Network API: send_chat, send_chat_to, recv_chat, load_mission, load_next_mission, get_player_list, get_my_player_id, get_server_id, get_player_info, kick, get_stat, get_name, get_slot, set_slot, force_player_slot, lua2json, json2lua, dostring_in, log, trace
Notes: