Jump to content

GetCallsignID

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetCallsignID
Function Description: Returns the numeric ID associated with an aircraft’s callsign prefix. The function first verifies that UnitName refers to a valid unit, then retrieves its full callsign (e.g., "Uzi11"). It extracts the alphabetic prefix, looks up that prefix in the predefined CALLSIGN table, and returns the corresponding number. If the unit is invalid or the prefix isn’t found, it returns nil.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetCallsignID( string UnitName )
Return Value: number or nil
Parameters: Name Description
UnitNameThe name of a unit whose callsign will be examined (e.g., "Uzi11").
Example: local id = CMM.GetCallsignID("Uzi11"); env.info("Callsign ID: "..tostring(id))
Example Description: Demonstrates retrieving the callsign ID for "Uzi11" and logging it.
Related Functions:
Notes: