update logging, add netId to player info, logmissioninfo
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
params [["_playerObj", objNull], ["_arrayToModify", [], [[]]]];
|
||||
|
||||
if (isNull _playerObj) exitWith {_arrayToModify};
|
||||
|
||||
{
|
||||
_arrayToModify = [_arrayToModify, _x#0, _x#1] call BIS_fnc_setToPairs;
|
||||
} forEach [
|
||||
["playerName", name _playerObj],
|
||||
["playerUID", getPlayerUID _playerObj],
|
||||
["playerGroup", groupId (group _playerObj)]
|
||||
["playerGroup", groupId (group _playerObj)],
|
||||
["playerNetID", [_playerObj] call BIS_fnc_netId]
|
||||
];
|
||||
|
||||
_arrayToModify;
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
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.
|
||||
1: _returnArray <BOOL> - If true, returns a key/value array of the player's name, UID and group name.
|
||||
*/
|
||||
|
||||
params [["_playerObj", objNull], ["_returnArray", false, [false, true]]];
|
||||
|
||||
switch (_returnArray) do {
|
||||
case false: {
|
||||
if (isNull _playerObj) exitWith {
|
||||
"playerName=""ERROR"" playerUID=""ERROR"" playerGroup=""ERROR"""
|
||||
};
|
||||
if (true) exitWith {
|
||||
format["playerName=""%1"" playerUID=""%2"" playerGroup=""%3""", name _playerObj, getPlayerUID _playerObj, groupId (group _playerObj)];
|
||||
};
|
||||
};
|
||||
case true: {
|
||||
if (isNull _playerObj) exitWith {
|
||||
[
|
||||
["playerName", "ERROR"],
|
||||
["playerUID", "ERROR"],
|
||||
["playerGroup", "ERROR"]
|
||||
]
|
||||
};
|
||||
if (true) exitWith {
|
||||
[
|
||||
["playerName", name _playerObj],
|
||||
["playerUID", getPlayerUID _playerObj],
|
||||
["playerGroup", groupId (group _playerObj)]
|
||||
]
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
23
functions/util/fn_logMissionInfo.sqf
Normal file
23
functions/util/fn_logMissionInfo.sqf
Normal file
@@ -0,0 +1,23 @@
|
||||
[
|
||||
"init",
|
||||
"MISSION INFO",
|
||||
[
|
||||
["serverName", serverName],
|
||||
["worldName", worldName],
|
||||
["missionSeries", getMissionConfigValue ["missionSeries", ""]],
|
||||
["missionName", missionName],
|
||||
["briefingName", briefingName],
|
||||
["overviewText", getMissionConfigValue ["overviewText", ""]],
|
||||
["onLoadName", getMissionConfigValue ["onLoadName", ""]],
|
||||
["onLoadMission", getMissionConfigValue ["onLoadMission", ""]],
|
||||
["missionAuthor", getMissionConfigValue ["author", ""]],
|
||||
["unitSlots", createHashMapFromArray [
|
||||
["EAST", playableSlotsNumber EAST], // 0 is EAST side
|
||||
["WEST", playableSlotsNumber WEST], // 1 is WEST side
|
||||
["RESISTANCE", playableSlotsNumber RESISTANCE], // 2 is RESISTANCE side
|
||||
["CIVILIAN", playableSlotsNumber CIVILIAN], // 3 is CIVILIAN side
|
||||
["SIDEUNKNOWN", 0], // 4 is SIDEUNKNOWN side
|
||||
["LOGIC", playableSlotsNumber sideLogic] // 5 is LOGIC side
|
||||
]]
|
||||
]
|
||||
] call milsim_fnc_log;
|
||||
Reference in New Issue
Block a user