structured logging

This commit is contained in:
2024-01-29 13:26:44 -08:00
parent 8d42fa4593
commit 2951e9cda9
4 changed files with 32 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
/*
Function: milsim_fnc_getPlayerLogString
Author: IndigoFox
Description:
Returns a string containing the player's name, UID and group name in 'key="value"' format.
Parameters:
0: _playerObj <OBJECT> - The player object to get the string for.
*/
params [["_playerObj", objNull]];
if (isNull _playerObj) exitWith {
"playerName=""ERROR"" playerUID=""ERROR"" playerGroup=""ERROR"""
};
format["playerName=""%1"" playerUID=""%2"" playerGroup=""%3""", name _playerObj, getPlayerUID _playerObj, groupId (group _playerObj)];