-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathQS_icons.sqf
1751 lines (1702 loc) · 63.9 KB
/
QS_icons.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*/
File: QS_icons.sqf
Script Name: Soldier Tracker
Author:
Quiksilver (contact: [email protected])
Version:
2.6.0 (released 11/10/2023 A3 2.14)
Created:
8/08/2014
Last Modified:
11/10/2023 A3 2.14 by Quiksilver
Installation:
In client/player init (initPlayerLocal.sqf)
[] execVM "QS_icons.sqf";
or
[] execVM "scripts\QS_icons.sqf"; (if in a folder called scripts in your mission directory.)
Follow instructions posted in the below link
http://forums.bistudio.com/showthread.php?184108-Soldier-Tracker-(-Map-and-GPS-Icons-)
_________________________________________________________________/*/
if (isDedicated || !hasInterface) exitWith {};
private [
'_side','_sides','_QS_ST_X','_QS_ST_map_enableUnitIcons','_QS_ST_gps_enableUnitIcons', '_QS_ST_enableGroupIcons','_QS_ST_faction','_QS_ST_friendlySides_EAST',
'_QS_ST_friendlySides_WEST','_QS_ST_friendlySides_RESISTANCE','_QS_ST_friendlySides_CIVILIAN','_QS_ST_friendlySides_Dynamic','_QS_ST_iconColor_EAST','_QS_ST_iconColor_WEST',
'_QS_ST_iconColor_RESISTANCE','_QS_ST_iconColor_CIVILIAN','_QS_ST_iconColor_UNKNOWN','_QS_ST_showMedicalWounded','_QS_ST_MedicalSystem','_QS_ST_MedicalIconColor','_QS_ST_iconShadowMap',
'_QS_ST_iconShadowGPS','_QS_ST_iconTextSize_Map','_QS_ST_iconTextSize_GPS','_QS_ST_iconTextOffset','_QS_ST_iconSize_Man','_QS_ST_iconSize_LandVehicle',
'_QS_ST_iconSize_Ship','_QS_ST_iconSize_Air','_QS_ST_iconSize_StaticWeapon','_QS_ST_GPSDist','_QS_ST_GPSshowNames','_QS_ST_GPSshowGroupOnly', '_QS_ST_showAIGroups',
'_QS_ST_showGroupMapIcons','_QS_ST_showGroupHudIcons','_QS_ST_groupInteractiveIcons','_QS_ST_groupInteractiveIcons_showClass','_QS_ST_dynamicGroupID',
'_QS_ST_showGroupMapText','_QS_ST_groupIconScale','_QS_ST_groupIconOffset','_QS_ST_groupIconText','_QS_ST_autonomousVehicles','_QS_fnc_iconColor','_QS_fnc_iconType',
'_QS_fnc_iconSize','_QS_fnc_iconPosDir','_QS_fnc_iconText','_QS_fnc_iconUnits','_QS_fnc_onMapSingleClick','_QS_fnc_mapVehicleShowCrew','_QS_fnc_iconDrawMap',
'_QS_fnc_iconDrawGPS','_QS_fnc_groupIconText','_QS_fnc_groupIconType','_QS_fnc_configGroupIcon','_QS_fnc_onGroupIconClick','_QS_fnc_onGroupIconOverLeave',
'_QS_ST_iconMapClickShowDetail','_QS_ST_showFriendlySides','_QS_fnc_onGroupIconOverEnter','_QS_ST_showCivilianGroups','_QS_ST_iconTextFont','_QS_ST_showAll','_QS_ST_showFactionOnly',
'_QS_ST_showAI','_QS_ST_showMOS','_QS_ST_showGroupOnly','_QS_ST_iconUpdatePulseDelay','_QS_ST_iconMapText','_QS_ST_showMOS_range',
'_QS_ST_iconTextFonts','_QS_fnc_isIncapacitated','_QS_ST_htmlColorMedical','_QS_ST_R','_QS_ST_showAINames','_QS_ST_AINames',
'_QS_ST_groupTextFactionOnly','_QS_ST_showCivilianIcons','_QS_ST_showOnlyVehicles','_QS_ST_showOwnGroup','_QS_ST_iconColor_empty',
'_QS_ST_iconSize_empty','_QS_ST_showEmptyVehicles','_QS_ST_colorInjured','_QS_ST_htmlColorInjured','_QS_fnc_iconColorGroup','_QS_ST_otherDisplays','_QS_ST_MAPrequireGPSItem',
'_QS_ST_GPSrequireGPSItem','_QS_ST_GRPrequireGPSItem','_QS_ST_admin'
];
//==============================================================================================================================//
//=============================================================== CONFIGURATION START ==========================================//
//==============================================================================================================================//
//============================================================== FREE TO EDIT BELOW!!! =========================================//
//==============================================================================================================================//
//==================================================================================//
//================================ CONFIGURE COMMON ================================//
//==================================================================================//
//================== MASTER SWITCHES
_QS_ST_map_enableUnitIcons = TRUE; // BOOL. TRUE to enable MAP unit/vehicle Icons. Default TRUE.
_QS_ST_gps_enableUnitIcons = TRUE; // BOOL. TRUE to enable GPS unit/vehicle Icons. Default TRUE.
_QS_ST_enableGroupIcons = TRUE; // BOOL. TRUE to enable Map+GPS+HUD GROUP Icons. Default TRUE.
//================= ADMIN
_QS_ST_admin = FALSE; // BOOL. TRUE to enable showing all units (even enemies) if logged in as admin on a server. Default FALSE;
_QS_ST_showAll = 0; // NUMBER. Intended for Debug / Development use only! Caution: Will cause lag if 1 or 2! Settings - 0 = Disabled (Recommended). 1 = Reveal all Units + vehicles. 2 = Reveal all mission objects + vehicles + units. May override below configurations if set at 1 or 2.
//================= DIPLOMACY - set the Friendly factions for each faction.
_QS_ST_friendlySides_Dynamic = TRUE; // BOOL. Set TRUE to allow faction alliances to change dynamically (IE. AAF may not always be loyal to NATO) and be represented on the map. Default TRUE.
_QS_ST_friendlySides_EAST = [ // ARRAY (NUMBER). Uncomment the relevant number(s). Remove comma after last used entry (important!).
//1, //EAST is friendly to WEST
//2, //EAST is friendly to INDEPENDENT/RESISTANCE
3 //EAST is friendly to CIVILIANS
];
_QS_ST_friendlySides_WEST = [ // ARRAY (NUMBER). Uncomment the relevant number(s). Remove comma after last used entry (important!).
//0, //WEST is friendly to EAST
2 //WEST is friendly to INDEP/RESISTANCE
//3 //WEST is friendly to CIVILIAN
];
_QS_ST_friendlySides_RESISTANCE = [ // ARRAY (NUMBER). Uncomment the relevant number(s). Remove comma after last used entry (important!).
//0, //RESISTANCE is friendly to EAST
1, //RESISTANCE is friendly to WEST
3 //RESISTANCE is friendly to CIVILIAN
];
_QS_ST_friendlySides_CIVILIAN = [ // ARRAY (NUMBER). Uncomment the relevant number(s). Remove comma after last used entry (important!).
0, //CIVILIAN is friendly to EAST
//1, //CIVILIAN is friendly to WEST
2 //CIVILIAN is friendly to INDEP/RESISTANCE
];
//================= DEFAULT ICON COLORS by FACTION
_QS_ST_iconColor_EAST = [0.5,0,0,0.65]; // ARRAY (NUMBER). RGBA color code. Default [0.5,0,0,0.65];
_QS_ST_iconColor_WEST = [0,0.3,0.6,0.65]; // ARRAY (NUMBER). RGBA color code. Default [0,0.3,0.6,0.65];
_QS_ST_iconColor_RESISTANCE = [0,0.5,0,0.65]; // ARRAY (NUMBER). RGBA color code. Default [0,0.5,0,0.65];
_QS_ST_iconColor_CIVILIAN = [0.4,0,0.5,0.65]; // ARRAY (NUMBER). RGBA color code. Default [0.4,0,0.5,0.65];
_QS_ST_iconColor_UNKNOWN = [0.7,0.6,0,0.5]; // ARRAY (NUMBER). RGBA color code. Default [0.7,0.6,0,0.5];
//================= MEDICAL
_QS_ST_showMedicalWounded = TRUE; // BOOL. TRUE to show wounded on the map and GPS. FALSE to not show wounded on the map with this script. Default TRUE.
_QS_ST_MedicalSystem = [ // ARRAY(STRING). The Active Medical System. Uncomment ONLY ONE. FIRST UNCOMMENTED ONE WILL BE USED. Comment the rest out as shown. Do not add commas and only allow 1 to be uncommented.
'BIS' // BIS Revive.
//'BTC' // BTC Revive.
//'AIS' // AIS Revive.
//'ACE' // ACE 3 Revive.
//'FAR' // Farooq's Revive.
//'AWS' // A3 Wounding System by Psycho.
];
_QS_ST_MedicalIconColor = [1,0.41,0,1]; // ARRAY (NUMBER). Color of medical icons in RGBA format. Default [1,0.41,0,1];
_QS_ST_colorInjured = [0.75,0.55,0,0.75]; // ARRAY (NUMBER). RGBA color code. Color of units with > 10% damage, in map group interactive interface. Default [0.7,0.6,0,0.5];
//==================================================================================//
//=========================== CONFIGURE MAP (UNIT/VEHICLE) ICONS ===================//
//==================================================================================//
_QS_ST_showFactionOnly = FALSE; // BOOL. will override ST_showFriendlySides TRUE. If TRUE then will only show players faction. If FALSE then can show friendly factions. Default FALSE.
_QS_ST_showAI = TRUE; // BOOL. FALSE = players only, TRUE = players and AI. Default TRUE.
_QS_ST_AINames = FALSE; // BOOL. Set TRUE to show human names for AI with the map/vehicle icons. Set FALSE and will be named 'AI'. Default FALSE.
_QS_ST_showCivilianIcons = FALSE; // BOOL. Set TRUE to allow showing of civilians, only works if Dynamic Diplomacy is enabled above. Default FALSE.
_QS_ST_iconMapText = TRUE; // BOOL. TRUE to show unit/vehicle icon text on the map. FALSE to only show the icon and NO text (name/class). Default TRUE.
_QS_ST_showMOS = TRUE; // BOOL. TRUE = show Military Occupational Specialty text(unit/vehicle class/role display name), FALSE = disable and only show icons and names. Default FALSE.
_QS_ST_showMOS_range = 3500; // NUMBER. Range in distance to show MOS on the map. Default 3500.
_QS_ST_showGroupOnly = FALSE; // BOOL. Set TRUE to show ONLY the unit icons of THE PLAYERS GROUP MEMBERS on the MAP, FALSE to show ALL your factions units. May override other config. Default TRUE.
_QS_ST_showOnlyVehicles = FALSE; // BOOL. Set TRUE to show ONLY vehicles, no foot-soldier units will be shown. May override other config. Default TRUE.
_QS_ST_iconMapClickShowDetail = TRUE; // BOOL. Set TRUE to show unit/vehicle detail when player clicks on their map near the vehicle. Only works for shown vehicles. Default TRUE.
_QS_ST_iconUpdatePulseDelay = 0; // NUMBER. How often should location of unit on the MAP be updated? 0 = as fast as possible, else if > 0 then it = time in seconds. Default 0.
_QS_ST_iconShadowMap = 1; // NUMBER. Icon Shadow on MAP. 0 = no shadow. 1 = shadow. 2 = outline. Must be 0, 1, or 2. Default 1.
_QS_ST_iconTextSize_Map = 0.05; // NUMBER. Icon Text Size on MAP display. Default is 0.05.
_QS_ST_iconTextOffset = 'right'; // STRING. Icon Text Offset. Can be 'left' or 'center' or 'right'. Default is 'right'
_QS_ST_iconSize_Man = 22; // NUMBER. Icon Size by Vehicle Type. Man/Units. Default = 22
_QS_ST_iconSize_LandVehicle = 26; // NUMBER. Icon Size by Vehicle Type. Ground-based vehicles. Default = 26
_QS_ST_iconSize_Ship = 24; // NUMBER. Icon Size by Vehicle Type. Water-based vehicles. Default = 24
_QS_ST_iconSize_Air = 24; // NUMBER. Icon Size by Vehicle Type. Air vehicles. Default = 24
_QS_ST_iconSize_StaticWeapon = 22; // NUMBER. Icon Size by Vehicle Type. Static Weapon (Mortar, remote designator, HMG/GMG. Default = 22
_QS_ST_iconTextFonts = [ // ARRAY (STRING). Icon Text Font. Only the uncommented one will be used. Do not add commas and only allow 1 to be uncommented. Default 'puristaMedium'.
//'EtelkaMonospacePro'
//'EtelkaMonospaceProBold'
//'EtelkaNarrowMediumPro'
//'LucidaConsoleB'
//'PuristaBold'
//'PuristaLight'
//'puristaMedium'
//'PuristaSemibold'
'TahomaB'
];
_QS_ST_otherDisplays = TRUE; // BOOL. TRUE to add Unit/Vehicle Icon support for UAV Terminal and Artillery Computer. Runs a separate script to handle these displays. Only works if _QS_ST_map_enableUnitIcons = TRUE;
_QS_ST_MAPrequireGPSItem = FALSE; // BOOL. TRUE to require player have GPS in his assigned items. Default FALSE.
//==================================================================================//
//=========================== CONFIGURE GPS (UNIT/VEHICLE) ICONS ===================//
//==================================================================================//
_QS_ST_GPSDist = 300; // NUMBER. Distance from player that units shown on GPS. Higher number = lower script performance. Not significant but every 1/10th of a frame counts! Default 300
_QS_ST_GPSshowNames = FALSE; // BOOL. TRUE to show unit names on the GPS display. Default FALSE.
_QS_ST_GPSshowGroupOnly = FALSE; // BOOL. TRUE to show only group members on the GPS display. Default TRUE.
_QS_ST_iconTextSize_GPS = 0.05; // NUMBER. Icon Text Size on GPS display. Default is 0.05.
_QS_ST_iconShadowGPS = 1; // NUMBER. Icon Shadow on GPS. 0 = no shadow. 1 = shadow. 2 = outline. Must be 0, 1, or 2. Default 1.
_QS_ST_GPSrequireGPSItem = FALSE; // BOOL. TRUE to require player have GPS in his assigned items. Default FALSE.
//==================================================================================//
//============================= CONFIGURE GROUP ICONS ==============================//
//==================================================================================//
_QS_ST_showGroupMapIcons = TRUE; // BOOL. Group icons displayed on map. Default TRUE.
_QS_ST_showGroupHudIcons = FALSE; // BOOL. Group icons displayed on player 3D HUD. Default FALSE.
_QS_ST_showAIGroups = TRUE; // BOOL. Show Groups with AI leaders. Default TRUE.
_QS_ST_showAINames = FALSE; // BOOL. Show AI Names. If FALSE, when names are listed with Group features, will only display as '[AI]'. Default FALSE.
_QS_ST_groupInteractiveIcons = TRUE; // BOOL. Group icons are interactable (mouse hover and mouse click for group details). Default TRUE.
_QS_ST_groupInteractiveIcons_showClass = TRUE; // BOOL. TRUE to show units vehicle class when revealing group details with interactive map group click. Default TRUE.
_QS_ST_dynamicGroupID = TRUE; // BOOL. If TRUE, Script tries to utilize BIS-Dynamic-Groups Group Name for group info display (only available with QS_ST_groupInteractiveIcons), if available. Default TRUE. EDIT: Obsolete as of A3 1.48
_QS_ST_showGroupMapText = TRUE; // BOOL. TRUE to show Group Name on the map. If FALSE, name can still be seen by clicking on the group icon, if QS_ST_groupInteractiveIcons = TRUE. Default FALSE.
_QS_ST_groupIconScale = 0.75; // NUMBER. Group Icon Scale. Default = 0.75
_QS_ST_groupIconOffset = [0.65,0.65]; // ARRAY (NUMBERS). [X,Y], offset position of icon from group leaders position. Can be positive or negative numbers. Default = [0.65,0.65];
_QS_ST_groupTextFactionOnly = TRUE; // BOOL. TRUE to show group icon text from ONLY the PLAYERS faction. FALSE will show text for all friendly/revealed factions. Default TRUE.
_QS_ST_showCivilianGroups = FALSE; // BOOL. TRUE to show Civilian groups. Must be whitelisted above in friendlySides. Default FALSE.
_QS_ST_showOwnGroup = FALSE; // BOOL. TRUE to show the Players own group icon. Default FALSE.
_QS_ST_GRPrequireGPSItem = FALSE; // BOOL. TRUE to require player have GPS in his assigned items. Default FALSE.
//==================================================================================//
//============================= CONFIGURE BONUS FEATURES ===========================//
//==================================================================================//
_QS_ST_showEmptyVehicles = FALSE; // BOOL. TRUE to mark certain unoccupied vehicles on the map. The vehicle must be assigned this variable: <vehicle> setVariable ['QS_ST_drawEmptyVehicle',TRUE,TRUE]; Default FALSE. Only works if _QS_ST_map_enableUnitIcons = TRUE;
_QS_ST_iconColor_empty = [0.7,0.6,0,0.5]; // ARRAY (NUMBERS). Color of unoccupied vehicles, in RGBA. Default = [0.7,0.6,0,0.5];
_QS_ST_iconSize_empty = 20; // NUMBER. Icon size of unoccupied vehicles, if shown.
//==================================================================================//
//================ TEXT (for LOCALIZATION / LANGUAGE TRANSLATION) ==================//
//==================================================================================//
QS_ST_STR_text1 = 'Click to show group details'; // STRING. Text shown when a player passes Mouse over Group leader (only if _QS_ST_groupInteractiveIcons = TRUE;)
QS_ST_STR_text2 = 'This group is not in your faction!'; // STRING. Text shown when a player clicks on a Group Icon of other faction. (only if _QS_ST_groupInteractiveIcons = TRUE;)
QS_ST_STR_text3 = '[AUTO]'; // STRING. Text shown on map when a UAV is in autonomous mode.
//==============================================================================================================================//
//=============================================================== CONFIGURATION END ============================================//
//==============================================================================================================================//
//===================================================== EDITING BELOW FOR ADVANCED USERS ONLY!!! ===============================//
//==============================================================================================================================//
_QS_fnc_isIncapacitated = {
params ['_u','_med'];
if ((lifeState _u) isEqualTo 'INCAPACITATED') exitWith {TRUE};
private _r = FALSE;
if (_med isEqualTo 'BTC') then {
if (!isNil {_u getVariable 'BTC_need_revive'}) then {
if ((_u getVariable 'BTC_need_revive') isEqualTo 1) then {
_r = TRUE;
};
};
} else {
if (_med isEqualTo 'FAR') then {
if (!isNil {_u getVariable 'FAR_isUnconscious'}) then {
if ((_u getVariable 'FAR_isUnconscious') isEqualTo 1) then {
_r = TRUE;
};
};
} else {
if (_med isEqualTo 'AIS') then {
if (!isNil {_u getVariable 'unit_is_unconscious'}) then {
if ((_u getVariable 'unit_is_unconscious')) then {
_r = TRUE;
};
};
} else {
if (_med isEqualTo 'AWS') then {
if (!isNil {_u getVariable 'tcb_ais_agony'}) then {
if ((_u getVariable 'tcb_ais_agony')) then {
_r = TRUE;
};
};
} else {
if (_med isEqualTo 'ACE') then {
if (!isNil {_u getVariable 'ACE_isUnconscious'}) then {
if ((_u getVariable 'ACE_isUnconscious')) then {
_r = TRUE;
};
};
};
};
};
};
};
_r;
};
_QS_fnc_iconColor = {
params [['_v',objNull],['_ds',1],'_QS_ST_X',['_ms',1]];
_u = effectiveCommander _v;
_s = side (group _u);
private _exit = FALSE;
private _c = _QS_ST_X select 13;
private _a = 0;
if (!(_v isKindOf 'Man')) then {
if (_v getVariable ['QS_ST_drawEmptyVehicle',FALSE]) then {
if ((count (crew _v)) isEqualTo 0) then {
_exit = TRUE;
_c = _QS_ST_X select 78;
_c set [3,0.65];
if (_ms > 0.80) then {
if (_ds isEqualTo 1) then {
_c set [3,0];
};
};
};
};
};
if (_exit) exitWith {_c;};
private _useTeamColor = FALSE;
if ((group _u) isEqualTo (group player)) then {
_useTeamColor = TRUE;
_a = 0.85;
} else {
_a = 0.65;
};
if (_QS_ST_X select 14) then {
if ([_u,((_QS_ST_X select 15) select 0)] call (_QS_ST_X select 69)) then {
_exit = TRUE;
_c = _QS_ST_X select 16;
_c set [3,_a];
if (_ms > 0.80) then {
if (_ds isEqualTo 1) then {
_c set [3,0];
};
};
};
} else {
if ([_u,((_QS_ST_X select 15) select 0)] call (_QS_ST_X select 69)) then {
_exit = TRUE;
_c = _QS_ST_X select 16;
_c set [3,0];
};
};
if (_exit) exitWith {_c;};
if (_useTeamColor) then {
if (isNull (objectParent _u)) then {
if (_s isEqualTo EAST) then {_c = _QS_ST_X # 9;};
if (_s isEqualTo WEST) then {_c = _QS_ST_X # 10;};
if (_s isEqualTo RESISTANCE) then {_c = _QS_ST_X # 11;};
if (_s isEqualTo CIVILIAN) then {_c = _QS_ST_X # 12;};
_c = [_c,_c,[1,0,0,1],[0,1,0.5,1],[0,0.5,1,1],[1,1,0,1]] # ((['','MAIN','RED','GREEN','BLUE','YELLOW'] find (assignedTeam _u)) max 1);
_c set [3,_a];
if (_ms > 0.80) then {
if (_ds isEqualTo 1) then {
_c set [3,0];
};
};
_exit = TRUE;
};
};
if (_exit) exitWith {_c;};
if (_s isEqualTo EAST) exitWith {_c = _QS_ST_X select 9; _c set [3,_a];if (_ds isEqualTo 1) then {if (_ms > 0.80) then {_c set [3,0];};};_c;};
if (_s isEqualTo WEST) exitWith {_c = _QS_ST_X select 10;_c set [3,_a];if (_ds isEqualTo 1) then {if (_ms > 0.80) then {_c set [3,0];};};_c;};
if (_s isEqualTo RESISTANCE) exitWith {_c = _QS_ST_X select 11;_c set [3,_a];if (_ds isEqualTo 1) then {if (_ms > 0.80) then {_c set [3,0];};};_c;};
if (_s isEqualTo CIVILIAN) exitWith {_c = _QS_ST_X select 12;_c set [3,_a];if (_ds isEqualTo 1) then {if (_ms > 0.80) then {_c set [3,0];};};_c;};
_c = _QS_ST_X select 13;if (_ds isEqualTo 1) then { if (_ms > 0.80) then {_c set [3,0];};};_c;
};
_QS_fnc_iconType = {
params ['_u'];
private _vt = typeOf (vehicle _u);
private _i = missionNamespace getVariable [format ['QS_ST_iconType#%1',_vt],''];
if (_i isEqualTo '') then {
if ((vehicle _u) isKindOf 'CAManBase') then {
if (_u getUnitTrait 'medic') then {
_vt = 'B_medic_F';
} else {
if (_u getUnitTrait 'engineer') then {
_vt = 'B_engineer_F';
} else {
if (_u getUnitTrait 'explosiveSpecialist') then {
_vt = 'B_soldier_exp_F';
};
};
};
};
_i = getText (configFile >> 'CfgVehicles' >> _vt >> 'icon');
missionNamespace setVariable [format ['QS_ST_iconType#%1',_vt],_i];
};
_i;
};
_QS_fnc_iconSize = {
params ['_v','','_QS_ST_X'];
private _i = missionNamespace getVariable [(format ['QS_ST_iconSize#%1',(typeOf _v)]),0];
if (_i isEqualTo 0) then {
if (_v isKindOf 'Man') then {_i = _QS_ST_X select 22;_i;};
if (_v isKindOf 'LandVehicle') then {_i = _QS_ST_X select 23;_i;};
if (_v isKindOf 'Air') then {_i = _QS_ST_X select 25;_i;};
if (_v isKindOf 'StaticWeapon') then {_i = _QS_ST_X select 26; _i;};
if (_v isKindOf 'Ship') then {_i = _QS_ST_X select 24;_i;};
missionNamespace setVariable [(format ['QS_ST_iconSize#%1',(typeOf _v)]),_i,FALSE];
};
_i;
};
_QS_fnc_iconPosDir = {
params ['_v','_ds','_dl'];
private _posDir = [[0,0,0],0];
if (_ds isEqualTo 1) then {
if (_dl > 0) then {
if (diag_tickTime > (missionNamespace getVariable 'QS_ST_iconUpdatePulseTimer')) then {
_posDir = [getPosASLVisual _v,getDirVisual _v];
_v setVariable ['QS_ST_lastPulsePos',_posDir,FALSE];
} else {
if (!isNil {_v getVariable 'QS_ST_lastPulsePos'}) then {
_posDir = _v getVariable 'QS_ST_lastPulsePos';
} else {
_posDir = [getPosASLVisual _v,getDirVisual _v];
_v setVariable ['QS_ST_lastPulsePos',_posDir,FALSE];
};
};
} else {
_posDir = [getPosASLVisual _v,getDirVisual _v];
};
} else {
_posDir = [getPosASLVisual _v,getDirVisual _v];
};
_posDir;
};
_QS_fnc_iconText = {
params ['_v','_ds','_QS_ST_X',['_ms',1]];
if ((_ds isEqualTo 2) || {(!(_QS_ST_X select 67))}) exitWith {
''
};
_showMOS = _QS_ST_X select 64;
_showAINames = _QS_ST_X select 71;
private _t = '';
private _n = 0;
private _vt = missionNamespace getVariable [format ['QS_ST_iconVehicleDN#%1',(typeOf _v)],''];
if (_vt isEqualTo '') then {
_vt = getText (configFile >> 'CfgVehicles' >> (typeOf _v) >> 'displayName');
missionNamespace setVariable [format ['QS_ST_iconVehicleDN#%1',(typeOf _v)],_vt];
};
if (!(_QS_ST_X select 64)) then {
_vt = '';
};
private _vn = name ((crew _v) select 0);
if (!isPlayer ((crew _v) select 0)) then {
if (!(_showAINames)) then {
_vn = '[AI]';
};
};
_isAdmin = (((call (missionNamespace getVariable 'BIS_fnc_admin')) isEqualTo 2) && (_QS_ST_X select 86));
if (((_v distance2D player) < (_QS_ST_X select 68)) || {(_isAdmin)}) then {
if ((_ms < 0.75) || {(_isAdmin)}) then {
if ((_ms > 0.25) || {(_isAdmin)}) then {
if (_showMOS) then {
_t = format ['%1 [%2]',_vn,_vt];
} else {
_t = format ['%1',_vn];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2]',_vn,_vt];
} else {
_t = format ['%1',_vn];
};
} else {
_t = '';
};
};
} else {
_t = '';
};
} else {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
_t = format ['%1',_vn];
} else {
if (_ms < 0.006) then {
_t = format ['%1',_vn];
} else {
_t = '';
};
};
} else {
_t = '';
};
};
if ((_v isKindOf 'LandVehicle') || {(_v isKindOf 'Air')} || {(_v isKindOf 'Ship')}) then {
_n = 0;
_n = (count (crew _v)) - 1;
if (_n > 0) then {
if (!isNil {_v getVariable 'QS_ST_mapClickShowCrew'}) then {
if (_v getVariable 'QS_ST_mapClickShowCrew') then {
_t = '';
private _crewIndex = 0;
private _na = '';
_crewCount = (count (crew _v)) - 1;
{
_na = name _x;
if (!(_showAINames)) then {
if (!isPlayer _x) then {
_na = '[AI]';
};
};
if (!(['error',_na,FALSE] call (missionNamespace getVariable 'BIS_fnc_inString'))) then {
if (!(_crewIndex isEqualTo _crewCount)) then {
_t = _t + _na + ', ';
} else {
_t = _t + _na;
};
};
_crewIndex = _crewIndex + 1;
} count (crew _v);
} else {
if (!isNull driver _v) then {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%1 [%2] +%3',_vn,_vt,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2] +%3',_vn,_vt,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
_t = format ['+%1',_n];
};
};
} else {
_t = format ['+%1',_n];
};
} else {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['[%1] %2 +%3',_vt,_vn,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['[%1] %2 +%3',_vt,_vn,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
_t = format ['+%1',_n];
};
};
} else {
_t = format ['+%1',_n];
};
};
};
} else {
if (!isNull driver _v) then {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%1 [%2] +%3',_vn,_vt,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2] +%3',_vn,_vt,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
_t = format ['+%1',_n];
};
};
} else {
_t = format ['+%1',_n];
};
} else {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['[%1] %2 +%3',_vt,_vn,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['[%1] %2 +%3',_vt,_vn,_n];
} else {
_t = format ['%1 +%2',_vn,_n];
};
} else {
_t = format ['+%1',_n];
};
};
} else {
_t = format ['+%1',_n];
};
};
};
} else {
if (!isNull driver _v) then {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%1 [%2]',_vn,_vt];
} else {
_t = format ['%1',_vn];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2]',_vn,_vt];
} else {
_t = format ['%1',_vn];
};
} else {
_t = '';
};
};
} else {
_t = '';
};
} else {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['[%1] %2',_vt,_vn];
} else {
_t = format ['%1',_vn];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['[%1] %2',_vt,_vn];
} else {
_t = format ['%1',_vn];
};
} else {
_t = '';
};
};
} else {
_t = '';
};
};
};
if (unitIsUAV _v) then {
if (alive (remoteControlled (currentPilot _v))) then {
_y = remoteControlled (currentPilot _v);
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%1 [%2]',name _y,_vt];
} else {
_t = format ['%1',name _y];
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2]',name _y,_vt];
} else {
_t = format ['%1',name _y];
};
} else {
_t = '';
};
};
} else {
_t = '';
};
} else {
if (isUavConnected _v) then {
_y = (UAVControl _v) select 0;
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%1 [%2]',name _y,_vt]; _t;
} else {
_t = format ['%1',name _y]; _t;
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%1 [%2]',name _y,_vt]; _t;
} else {
_t = format ['%1',name _y]; _t;
};
} else {
_t = '';
};
};
} else {
_t = '';
};
} else {
if (_ms < 0.75) then {
if (_ms > 0.25) then {
if (_showMOS) then {
_t = format ['%2 [%1]',_vt,QS_ST_STR_text3]; _t;
} else {
_t = QS_ST_STR_text3; _t;
};
} else {
if (_ms < 0.006) then {
if (_showMOS) then {
_t = format ['%2 [%1]',_vt,QS_ST_STR_text3]; _t;
} else {
_t = QS_ST_STR_text3; _t;
};
} else {
_t = '';
};
};
} else {
_t = '';
};
};
};
};
};
_t;
};
_QS_fnc_iconUnits = {
params ['_di','_QS_ST_X'];
private _exit = FALSE;
private _si = [EAST,WEST,RESISTANCE,CIVILIAN];
private _as = [];
private _au = [];
_isAdmin = (((call (missionNamespace getVariable 'BIS_fnc_admin')) isEqualTo 2) && (_QS_ST_X select 86));
if (!(playerSide isEqualTo CIVILIAN)) then {
if (!(_QS_ST_X select 74)) then {
_si = [EAST,WEST,RESISTANCE];
};
};
if ((_QS_ST_X select 61) > 0) exitWith {
if ((_QS_ST_X select 61) isEqualTo 1) then {
_au = allUnits + vehicles;
};
if ((_QS_ST_X select 61) isEqualTo 2) then {
_au = entities [[],[],TRUE,TRUE];
};
_au;
};
if (((_di isEqualTo 1) && ((_QS_ST_X select 65))) && {(!(_QS_ST_X select 75))}) then {
_exit = TRUE;
_au = units (group player);
if ((_QS_ST_X select 80)) then {
{
if (!(_x in _au)) then {
if (_x getVariable ['QS_ST_drawEmptyVehicle',FALSE]) then {
if ((crew _x) isEqualTo []) then {
0 = _au pushBack _x;
};
};
};
} count vehicles;
};
_au;
};
if ((_di isEqualTo 2) && ((_QS_ST_X select 29))) then {
_exit = TRUE;
_au = units (group player);
_au;
};
if (_exit) exitWith {_au;};
if ((_QS_ST_X select 62)) then {
_as pushBack (_si select (_QS_ST_X select 3));
} else {
if (isMultiplayer) then {
if (_isAdmin) then {
{
0 = _as pushBack _x;
} count _si;
} else {
if ((_QS_ST_X select 8)) then {
_as pushBack (_si select (_QS_ST_X select 3));
{
if (((_si select (_QS_ST_X select 3)) getFriend _x) > 0.6) then {
0 = _as pushBack _x;
};
} count _si;
} else {
_as pushBack (_si select (_QS_ST_X select 3));
{
0 = _as pushBack (_si select _x);
} count (_QS_ST_X select 57);
};
};
} else {
if ((_QS_ST_X select 8)) then {
_as pushBack (_si select (_QS_ST_X select 3));
{
if (((_si select (_QS_ST_X select 3)) getFriend _x) > 0.6) then {
0 = _as pushBack _x;
};
} count _si;
} else {
_as pushBack (_si select (_QS_ST_X select 3));
{
0 = _as pushBack (_si select _x);
} count (_QS_ST_X select 57);
};
};
};
if (!(_QS_ST_X select 63)) then {
if (isMultiplayer) then {
if (_isAdmin) then {
{
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
} count allUnits;
} else {
{
if (((side _x) in _as) || {(captive _x)}) then {
if (isPlayer _x) then {
if (_di isEqualTo 2) then {
if ((_x distance2D player) < (_QS_ST_X select 27)) then {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
} else {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
};
};
} count (allPlayers + allUnitsUav);
};
} else {
{
if (((side _x) in _as) || {(captive _x)}) then {
if (isPlayer _x) then {
if (_di isEqualTo 2) then {
if ((_x distance2D player) < (_QS_ST_X select 27)) then {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
} else {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
};
};
} count (allPlayers + allUnitsUav);
};
} else {
{
if (((side _x) in _as) || {(captive _x)}) then {
if (_di isEqualTo 2) then {
if ((_x distance2D player) < (_QS_ST_X select 27)) then {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
} else {
if (_x isEqualTo ((crew (vehicle _x)) select 0)) then {
0 = _au pushBack _x;
};
};
};
} count allUnits;
};
if ((_di isEqualTo 1) && (_QS_ST_X select 75)) exitWith {
_auv = [];
{
if (!((vehicle _x) isKindOf 'Man')) then {
0 = _auv pushBack _x;
};
} count _au;
if ((_QS_ST_X select 80)) then {
{
if (!(_x in _auv)) then {
if (_x getVariable ['QS_ST_drawEmptyVehicle',FALSE]) then {
if ((crew _x) isEqualTo []) then {
0 = _auv pushBack _x;
};
};
};
} count vehicles;
};
if ((_QS_ST_X select 65)) then {
{
0 = _auv pushBack _x;
} count (units (group player));
};
_auv;
};
if ((_di isEqualTo 1) && (_QS_ST_X select 80)) exitWith {
{
if (!(_x in _au)) then {
if (_x getVariable ['QS_ST_drawEmptyVehicle',FALSE]) then {
if ((crew _x) isEqualTo []) then {
0 = _au pushBack _x;
};
};
};
} count vehicles;
_au;
};
_au;
};
_QS_fnc_onMapSingleClick = {
params ['_units','_position','_alt','_shift'];
if ((!(_alt)) && (!(_shift))) then {
if (player getVariable 'QS_ST_mapSingleClick') then {
player setVariable ['QS_ST_mapSingleClick',FALSE,FALSE];
if (alive (player getVariable ['QS_ST_map_vehicleShowCrew',objNull])) then {
(player getVariable ['QS_ST_map_vehicleShowCrew',objNull]) setVariable ['QS_ST_mapClickShowCrew',FALSE,FALSE];
};
};
comment "player setVariable ['QS_ST_map_vehicleShowCrew',objNull,FALSE];";
player setVariable ['QS_ST_mapSingleClick',TRUE,FALSE];
private _vehicle = objNull;
_vehicles = (nearestObjects [_position,['Air','LandVehicle','Ship'],250,TRUE]) select {(alive _x)};
if ((count _vehicles) > 0) then {
if ((count _vehicles) > 1) then {
private _dist = 999999;
{
if ((_x distance2D _position) < _dist) then {
_dist = _x distance2D _position;
_vehicle = _x;
};
} forEach _vehicles;
} else {
_vehicle = _vehicles select 0;
};
};
_QS_ST_X = [] call (missionNamespace getVariable 'QS_ST_X');
if (alive _vehicle) then {
if ((count (crew _vehicle)) > 1) then {
if ((side (effectiveCommander _vehicle)) isEqualTo playerSide) then {
if (!(_vehicle isEqualTo (player getVariable ['QS_ST_map_vehicleShowCrew',objNull]))) then {
player setVariable ['QS_ST_map_vehicleShowCrew',_vehicle,FALSE];
_vehicle setVariable ['QS_ST_mapClickShowCrew',TRUE,FALSE];
} else {
(player getVariable ['QS_ST_map_vehicleShowCrew',objNull]) setVariable ['QS_ST_mapClickShowCrew',FALSE,FALSE];
player setVariable ['QS_ST_map_vehicleShowCrew',objNull,FALSE];
player setVariable ['QS_ST_mapSingleClick',FALSE,FALSE];
};
} else {
(player getVariable ['QS_ST_map_vehicleShowCrew',objNull]) setVariable ['QS_ST_mapClickShowCrew',FALSE,FALSE];
player setVariable ['QS_ST_map_vehicleShowCrew',objNull,FALSE];
player setVariable ['QS_ST_mapSingleClick',FALSE,FALSE];
};
} else {
(player getVariable ['QS_ST_map_vehicleShowCrew',objNull]) setVariable ['QS_ST_mapClickShowCrew',FALSE,FALSE];
player setVariable ['QS_ST_map_vehicleShowCrew',objNull,FALSE];
player setVariable ['QS_ST_mapSingleClick',FALSE,FALSE];
};
} else {
(player getVariable ['QS_ST_map_vehicleShowCrew',objNull]) setVariable ['QS_ST_mapClickShowCrew',FALSE,FALSE];
player setVariable ['QS_ST_map_vehicleShowCrew',objNull,FALSE];
player setVariable ['QS_ST_mapSingleClick',FALSE,FALSE];
};
};
if (_shift) then {
if (player isEqualTo (leader (group player))) then {
private _nearUnit = objNull;
_nearUnits = (nearestObjects [_position,['CAManBase'],250,TRUE]) select {((alive _x) && ((group _x) isEqualTo (group player)) && (isNull (objectParent _x)))};
if ((count _nearUnits) > 0) then {
if ((count _nearUnits) > 1) then {
private _dist = 999999;
{
if ((_x distance2D _position) < _dist) then {
_dist = _x distance2D _position;
_nearUnit = _x;
};
} forEach _nearUnits;
} else {
_nearUnit = _nearUnits select 0;
};
};
if (alive _nearUnit) then {
player groupSelectUnit [_nearUnit,(!(_nearUnit in _units))];
};
};
};
};
_QS_fnc_mapVehicleShowCrew = {};
_QS_fnc_iconDrawMap = {
_m = _this select 0;
_QS_ST_X = [] call (missionNamespace getVariable 'QS_ST_X');
if ((_QS_ST_X select 83) && ((player getSlotItemName 612) isEqualTo '')) exitWith {};
if (diag_tickTime > (missionNamespace getVariable 'QS_ST_updateDraw_map')) then {
missionNamespace setVariable ['QS_ST_updateDraw_map',(diag_tickTime + 3),FALSE];
missionNamespace setVariable ['QS_ST_drawArray_map',([1,_QS_ST_X] call (_QS_ST_X select 46)),FALSE];
};
_sh = _QS_ST_X select 17;
_ts = _QS_ST_X select 19;
_tf = _QS_ST_X select 60;
_to = _QS_ST_X select 21;
_de = _QS_ST_X select 66;
_player = player;
_ms = ctrlMapScale _m;
private _ve = objNull;
private _po = [[0,0,0],0];
private _is = 0;
if (!((missionNamespace getVariable 'QS_ST_drawArray_map') isEqualTo [])) then {
{
if (!isNull _x) then {
_ve = vehicle _x;
if (alive _ve) then {
_po = [_ve,1,_de] call (_QS_ST_X select 44);
_is = [_ve,1,_QS_ST_X] call (_QS_ST_X select 43);
if (_ve isEqualTo (vehicle _player)) then {
_m drawIcon ['a3\ui_f\data\igui\cfg\islandmap\iconplayer_ca.paa',[1,0,0,0.75],(_po select 0),24,24,(_po select 1),'',0,0.03,_tf,_to];
};
_m drawIcon [
([_ve,1,_QS_ST_X] call (_QS_ST_X select 42)),
([_ve,1,_QS_ST_X,_ms] call (_QS_ST_X select 41)),
(_po select 0),
_is,
_is,
(_po select 1),
([_ve,1,_QS_ST_X,_ms] call (_QS_ST_X select 45)),
_sh,
_ts,
_tf,
_to
];
};
};
} count (missionNamespace getVariable ['QS_ST_drawArray_map',[]]);
};
if (_player isEqualTo (leader (group _player))) then {
if (!((groupSelectedUnits _player) isEqualTo [])) then {
{
_m drawLine [(getPosASLVisual _player),(getPosASLVisual (vehicle _x)),[0,1,1,0.5]];