Jump to content

GetNearbyPlayers()

From CMM Wiki
Revision as of 12:26, 24 June 2026 by Ozdeadmeat (talk | contribs) (GetNearbyPlayers() – created via PowerShell script (2026-06-24T22:26:45Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetNearbyPlayers()
Function Description: returns a table of player units within a certain radius of a given point
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetNearbyPlayers()( table vec3 , number or nil radius , number or nil coal )
Return Value: table or nil
Parameters: Name Description
vec3vec3 table of the point you want to search around
radiusRadius in meters to search for player units, if nil it will default to 1000 meters
coalCoalition number to filter results by, if nil it will return players from all coalitions
Example: CMM.GetNearbyPlayers(<vec3>, 500, coalition.side.RED)
Example Description: Will return a list of player units within 500 meters of the specified vec3 point that are in the red coalition
Related Functions:
Notes: