MarkerAuth
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | MarkerAuth | |
| Function Description: | Authenticates a player by checking their registration status and optionally auto-registers them in multiplayer. | |
| File Location: | cmm.MapCommandFunctions.lua | |
| Syntax: | CMM.MarkerAuth( table EventData , number: PlayerNetID ) | |
| Return Value: | table,table | |
| Parameters: | Name | Description |
| EventData | Event data passed from the marker interaction | |
| PlayerNetID | Net ID of the player interacting with the marker (nil in singleplayer) | |
| Example: | CMM.MarkerAuth(EventData, 12345) | |
| Example Description: | Checks if a player is registered in the auth table. In singleplayer, uses local player info. In multiplayer, uses the provided net ID. If the player is already registered, updates the auth table and returns the entry. If not registered and auto-registration is enabled, auto-registers the player and returns the entry. Otherwise, displays a message instructing the player to register via the F10 map. Returns nil if not registered and auto-registration is disabled. | |
| Related Functions: | ||
| Notes: | ||