24 lines
659 B
Plaintext
24 lines
659 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
// we'll use this to display status if nearby players are in the flag menu
|
|
|
|
// adds codeblock to common array to be processed per frame
|
|
private _code = {
|
|
private _unitsToDraw = (localNamespace getVariable [QEGVAR(client,nearMen), []]) select {
|
|
(_x getVariable [QGVAR(inFlagMenu), false]) && {
|
|
// distance within X meters
|
|
player distance _x <= 15 ||
|
|
// check unit not in a vehicle
|
|
isNull (objectParent _x)
|
|
}
|
|
};
|
|
[
|
|
_unitsToDraw,
|
|
"",
|
|
"Setting vehicle flag...",
|
|
[0.9, 0.9, 0.9, 1]
|
|
] call EFUNC(common,draw3dIconStatus);
|
|
};
|
|
|
|
// add codeblock to common array
|
|
[_code] call EFUNC(client,registerPFHCode); |