Jump to content

FindPlayerNetID

From CMM Wiki
Revision as of 12:27, 24 June 2026 by Ozdeadmeat (talk | contribs) (FindPlayerNetID – created via PowerShell script (2026-06-24T22:27:02Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: FindPlayerNetID
Function Description: Retrieves the netID of a player by their name from the mission player list, returning the netID if found or -1 if not present.
File Location: cmm.netFunctions.lua
Syntax: CMM.FindPlayerNetID( string PlayerName )
Return Value: number or string
Parameters: Name Description
PlayerNameThe name of the player as it appears in the mission editor or in-game.
Example: CMM.FindPlayerNetID("OzDeaDMeaT")
Example Description: Looks up the netID for the player named "OzDeaDMeaT" in the player list and returns it if found, otherwise returns -1.
Related Functions:
Notes: