From 2873104a0099faa9acc1dc1da673f1bb66e260eb Mon Sep 17 00:00:00 2001 From: Zepheris Date: Tue, 18 Feb 2020 12:42:12 -0700 Subject: [PATCH] Added Player Marker, Flip Vehicle, and Status Bar --- .../addons/status_bar/Images/damage.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/energy.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/hunger.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/krypto.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/players.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/restart.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/stamina.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/thirst.paa | Bin 0 -> 1522 bytes .../addons/status_bar/Images/toxicity.paa | Bin 0 -> 1522 bytes .../addons/status_bar/adminBar.sqf | 203 +++++++++++++++++ .../addons/status_bar/adminBar_WS.sqf | 203 +++++++++++++++++ .../addons/status_bar/init_statusBar.sqf | 32 +++ .../addons/status_bar/playerBar.sqf | 209 ++++++++++++++++++ .../addons/status_bar/statusBar.hpp | 34 +++ .../mpmissions/epoch.Bornholm/description.ext | 1 + .../CfgActionMenu/CfgActionMenu_target.hpp | 12 +- Server/mpmissions/epoch.Bornholm/init.sqf | 10 + .../epoch.Bornholm/scripts/flip.sqf | 22 ++ .../epoch.Bornholm/scripts/playermarker.sqf | 51 +++++ 19 files changed, 775 insertions(+), 2 deletions(-) create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/damage.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/energy.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/hunger.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/krypto.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/players.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/restart.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/stamina.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/thirst.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/toxicity.paa create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar.sqf create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar_WS.sqf create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/init_statusBar.sqf create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/playerBar.sqf create mode 100644 Server/mpmissions/epoch.Bornholm/addons/status_bar/statusBar.hpp create mode 100644 Server/mpmissions/epoch.Bornholm/scripts/flip.sqf create mode 100644 Server/mpmissions/epoch.Bornholm/scripts/playermarker.sqf diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/damage.paa b/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/damage.paa new file mode 100644 index 0000000000000000000000000000000000000000..6e9403e8729eb399c144b9c67454d1017cc4b2c8 GIT binary patch literal 1522 zcmZSm@9ypx;_M#g$il$DaPZ(k5imc((HF%34+J2-yQ7aAh|dVbAbzl$o4*5)-2lYx zK#4w928OFZOgd0tP+(vH84Up-3t?;!Jy`fW-rI6-Z_91@|NquCptC|?Zlsm_c!NRq zC0ax5b8t|7d@uRC^FN?b5cRCAA6q9^{}{2!6m43Y;rCqVq@ zhPej?ZGiCwbdP9gDEskkxhK>3!1@_PLKwLiJSVAmOi}^62b_!`AxNxy(8HUD!E=HN z&`7ZRfRd&&JvPYy-Wq@V-p+HYfI#+;>YX!C_lkFbF_O7gT35D}aI-maG{F2BUz)wp{CNiI8LmOt%uxJI;uw zB!QDDFjWRDV(@G_;Crqf6m0>4p`py6Wa-%iO_qps2@58m{fWSA56*@T3=9r$7@q7? z4Q8?c=?`UPg(obSdh}pqN=J1rYu1loVo-;LNqOa z{0?7O?iS^c+?Ff7Eg70S9T=3)x5(aZhQ&53usme}g{N}qwzntBau0)yVF?uxfw&F; Dd`0-f literal 0 HcmV?d00001 diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/energy.paa b/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/energy.paa new file mode 100644 index 0000000000000000000000000000000000000000..9df36d6e37f35c2e671d92030ed8cdb96498954b GIT binary patch literal 1522 zcmZSm@9ypx;_M#g$il$DaOu(|EigaA(HF%34+J2-yQ7aAh|dVbAbzl$o4*5)-2lYx zK#4w928OFZOgd0tP+(vH84Up-3t?;!Jy`i|@3-aN-j=KK|NpIPKxc+P__8;ke0We$ z%l)PA%o6^WckXHI~O{(t-4&U34Pp!N*^2V{QfyA8FsH_F}ysb>TNSeSy; zz}O&~X#P6~z9&Egv)}pk|Nr*&AGl%m|G&kM07@M&{yPSbCKVu}mHiAK`M+`O|KJ2N zKU7pSbmpI*{r`W@hldBP?KivEE_i$S-_s!bU0Fp%jrRTT|6`W_9qgXakN|4ifB#ci z{&TY|aC`!zpMn1*f6dJ;xnRC1D}`hmd` z68lZ@&*`0Wz|kfO1W;Gw43_T5e23b1|= z1_s%RiZv&oe1z?YY{ZpOKZ-qN6N% r`nLplYS39YUG`=R#2QvsR$zI`0t!#{b=%%vQOi95(k21~5Z?j-U2G7N literal 0 HcmV?d00001 diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/hunger.paa b/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/hunger.paa new file mode 100644 index 0000000000000000000000000000000000000000..97db76c9c2ffdde92f209a01230865aac8c12078 GIT binary patch literal 1522 zcmZSm@9ypx;_M#g$il$DaN@)XMKC|Y(HF%34+J2-yQ7aAh|dVbAbzl$o4*5)-2lYx zK#4w928OFZOgd0tP+(vH84Up-3t?;!Jy`hOi?`+8-uAZP|NmRpfX)gro(kgMWrgxX z-A{q|xyn#}K*nVdU-kx+4-Xo0{S&i~?^OfeixnXALV#eMt@b7*Z6&4K_jaCJ1q5f$ zo8>(>%Xw%3B~X9WUSn38M1^B2EIf5P&?<^!z{F#hWKLH>NrO^|(| zp`ok{XC3&S01?c7hPV757=Q@Gr-uFZjzIsFHu>cXK7@nM+Y;Ufl<(@?KEdX1N1d{*& literal 0 HcmV?d00001 diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/krypto.paa b/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/krypto.paa new file mode 100644 index 0000000000000000000000000000000000000000..6eccd9ec1130cc412edeab21510d776808d6813b GIT binary patch literal 1522 zcmc(fZ%9*76u{5WXAe7ioti=JW>2&W#caiHw^bNvsNK`&(bc;#KP; zJ?$ftf7Pd%G?acv_IzqD2m+rpqx^z#bGmo*!Si+^`}_MaRwj6O(8fx>i{wc@?g4GWOK5BxGnxpwh{Q?Zfom9kq z+d!G)Os3+Ar;c4OW_MGzT1C;^TXFGOMaw42DwQa%??H~Vnp0Dhd0rH2n>zd>m#bKQ zl0InumEFj32H9Ez{=AUPh=ms}?Fp5prG+Fj#f|73scS zyl5Ztp`l>tj&_*pN&AE5Khl1>d>YxWj!YutoKu=N2ih6jh-1nm7C}GWkMaAW z-~1Mj`3!c61vu&>#dik${}}(W-LIwdkA`Uax`ZvccA7MH?P6)$h>H=nP)9yNVpGhL zYo)(|9Qnxhkm`9NJAdRgN36@+E+50>Ps$pfZ`38T(R!7=E<{b<(@@$^?ta*H&AkA!pOuwSl#o27_8H_ z@_%mM+j(vk5FGwc|L1sm%@L6OqCh}Mo>Kem-@Kgv@5cMTAp1f?LqpU*MlVdU4 Qn`@VTIvrnz1 zQl`B(l`#VVP%4$;5+61X5U!ySPMP}|VFefALyYwr_A+*+X(fT%qq zLI0cH|FKt(_KL{OWX8|dYR{j7Wpm~pUEgyt+eMgjZZJ18QQNV_tz!k_kCd<64a#^` z<9t>?ZMA{P|{lHWjM#p<{6=#b>sR8?Jpo~r?Th@bo`kiL+>hp>W{EWUEy>8HLD zwk^v-zOcIxm;1^8yL_gr!s!wNQJ;USTZl*3&do}Glk>Ls`uzH^UM6gDuIf|QznAB7 zk{{E9wy&{gyRdEyUf0aMSuqN;pyB@fij{d*#;4$IHjx5FeJ)X7|x4;!+>a zqOnE7xi<16wmT|kKHbY#mSui6*A!L=qra~2pT7C|R+dD+pO1z4urI@xcGdYfc9(sA zbYsIWSXr8A=&6lrH?QYs*zCOgYkUi|c(;p3^tZAb`=|}xZvkK!vDM5>dL)&nHrPCA z##U#yC3kjC64v-ZQ^wDEV~P4o9>@Av&y*ZvoNCBC>)gGmaCwp9amsjX^>%Pl?@tmo zO^XjfdOp#6%^!Qe3XN;4`vY_Qw%h3Ke%o=<$66!$XInxL0s|m6hR4tyi(~+QcZqLq wFM3$jA|riHP#=`jWZM>uLGE-S@1>z>D&D67s%IoCK0XL#AIfc<{9 literal 0 HcmV?d00001 diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/stamina.paa b/Server/mpmissions/epoch.Bornholm/addons/status_bar/Images/stamina.paa new file mode 100644 index 0000000000000000000000000000000000000000..05dfe45ddaaafcbac0455f9fbc4f7e7e213437a5 GIT binary patch literal 1522 zcmZSm@9ypx;_M#g$il$DaN@)XSuj7s(HF%34+J2-yQ7aAh|dVbAbzl$o4*5)-2lYx zK#4w928OFZOgd0tP+(vH84Up-3t?;!JyiIHC%5I^-j=KU|NpIPKxYTAy#n!N4?+2& zFh7y&ADLw!^HQHc%yS5_`Lr#UmH6|FVPluCAh?5}*F-n{7)3`#&_)fkE)hR@vJda>0C{dtlb%OkaFE z%JQC@rGV831OzZJ{P6tue-aB&{jF=Ep`i>?*ZT`^Zpa0@$CZ`QLGS6G*K>YPybhJ8 zIKE*H#1%gI7q=x^Z_5O`&jIK@$CvhhZZ$&uC&~(sZk+xjWIny+1sDX7QUy+D+sA>E z#Su_21Dyy=h!B7)m~>umd#I|Aup6Wvm@5L*f1V3G$N5JH5>29^jA+S{>)y6p>21m2 zXk~D4aF9IxjnAN-=LS@NsOk+@`J26SZ-Vu^va+%yZsY}KdvG)$r7F1lwE}^LLFFAB z7#IXTH0r|Cvm#O~$T; zybvJx5Aq?403*zPSgL{XbRI8baq#9R0R{m`>4KVVM9{LC5{cPNW6!qa&&S^X zg9KYhh}YRovbX2|Jq+R#lT9RV{Mi3x^-8dMU@(hvKd%2!|NnSAESd>rGu?Y}8OhLS z2mwZ$*_)p>H=uk`c&0!^3kL%SFi|m>_5;;yOMVP;CIc|Lao*d;dwVl9H!%Wp(+dXX ufCdh5>I(oS2gOIr=iX|8qz+bAR$zI`0t!#V z@wpj1C#iTgslfO!KM~7kya6&VT?eL~?{wJamX#q2Fuv{{Pop4RnHwyYT4FAO`UGzrSRgy|Q3Z;)(KrmP0zf6@M?#&BtwC5->3%a0{s zjsP=^|D55>)+JSZaCybst+Kb)p1lQ=Clns8ul7A~?t3;3rv9A|vx=AQ0}dGfxk*FR zO1_oCF#aoDCY8YMjd1>J?WRSU1uX3_`Se2_dvEmIg@+d*`xQRrrL?*wuZHP=&U5xd zO^%WujQ^=BLe*DN;S7xbR##df@q&^AjQ@z?_s=EjTRCBThHIJvOson-r)TkkZOPKW zBmmQIb@ydU*|sb={|v+0;Oz}l;OWca)C86c&m_2f&b90dhc+Sf^DuY-)8iz#dP4rE zx4Zy@0Hkz*SPb*FSTZOZF&^1W$(O&Qv+IEw|b%sUN1E`&#x%L65~PF#aIPIw(xAlymdo&W#< literal 0 HcmV?d00001 diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar.sqf b/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar.sqf new file mode 100644 index 0000000..a190f8d --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar.sqf @@ -0,0 +1,203 @@ +waitUntil {!(isNull (findDisplay 46))}; +disableSerialization; + + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + systemChat format["Loading Admin info...", _rscLayer]; + [] spawn { + + sleep 5; + //set the color values. + //Additional color codes can be found here: http://html-color-codes.com/ + _colourDefault = parseText "#ADADAD"; //set your default colour here + _colour100 = parseText "#336600"; + _colour90 = parseText "#339900"; + _colour80 = parseText "#33CC00"; + _colour70 = parseText "#33FF00"; + _colour60 = parseText "#66FF00"; + _colour50 = parseText "#CCFF00"; + _colour40 = parseText "#CCCC00"; + _colour30 = parseText "#CC9900"; + _colour20 = parseText "#CC6600"; + _colour10 = parseText "#CC3300"; + _colour0 = parseText "#CC0000"; + _colourDead = parseText "#000000"; + + + while {true} do + { + sleep 1; + + //moved the creation of the status bar inside the loop and create it if it is null, + //this is to handle instance where the status bar is disappearing + if(isNull ((uiNamespace getVariable "statusBar")displayCtrl 55555)) then + { + diag_log "statusbar is null create"; + disableSerialization; + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + }; + + //initialize variables and set values + _unit = _this select 0; + _damage = round ((1 - (damage player)) * 100); + _hunger = round((EPOCH_playerHunger/5000) * 100); + _thirst = round((EPOCH_playerThirst/2500) * 100); + _wallet = EPOCH_playerCrypto; + _stamina = round(EPOCH_playerStamina * 100) / 100; + _energy = round(EPOCH_playerEnergy); + _toxPercent = round (EPOCH_playerToxicity); + _energyPercent = floor((_energy / 2500 ) * 100); + _serverFPS = if (typeName EPOCH_diag_fps == "SCALAR") then [{EPOCH_diag_fps},{"MANIPULATED"}], + _pos = getPosATL player; //switch to this below if you want to have world space coords displayed instead of gridref + _dir = getDir (vehicle player); + _grid = mapGridPosition player; + _xx = (format[_grid]) select [0,3]; + _yy = (format[_grid]) select [3,3]; + _time = (round(240-(serverTime)/60)); //edit the '240' value (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals + _hours = (floor(_time/60)); + _minutes = (_time - (_hours * 60)); + _players = (count playableUnits -1); + + switch(_minutes) do { + case 9: {_minutes = "09"}; + case 8: {_minutes = "08"}; + case 7: {_minutes = "07"}; + case 6: {_minutes = "06"}; + case 5: {_minutes = "05"}; + case 4: {_minutes = "04"}; + case 3: {_minutes = "03"}; + case 2: {_minutes = "02"}; + case 1: {_minutes = "01"}; + case 0: {_minutes = "00"}; + }; + + //Colour coding + //Damage + _colourDamage = _colourDefault; + + switch true do { + case(_damage >= 100) : {_colourDamage = _colour100;}; + case((_damage >= 90) && (_damage < 100)) : {_colourDamage = _colour90;}; + case((_damage >= 80) && (_damage < 90)) : {_colourDamage = _colour80;}; + case((_damage >= 70) && (_damage < 80)) : {_colourDamage = _colour70;}; + case((_damage >= 60) && (_damage < 70)) : {_colourDamage = _colour60;}; + case((_damage >= 50) && (_damage < 60)) : {_colourDamage = _colour50;}; + case((_damage >= 40) && (_damage < 50)) : {_colourDamage = _colour40;}; + case((_damage >= 30) && (_damage < 40)) : {_colourDamage = _colour30;}; + case((_damage >= 20) && (_damage < 30)) : {_colourDamage = _colour20;}; + case((_damage >= 10) && (_damage < 20)) : {_colourDamage = _colour10;}; + case((_damage >= 1) && (_damage < 10)) : {_colourDamage = _colour0;}; + case(_damage < 1) : {_colourDamage = _colourDead;}; + }; + + + //Hunger + _colourHunger = _colourDefault; + switch true do { + case(_hunger >= 100) : {_colourHunger = _colour100;}; + case((_hunger >= 90) && (_hunger < 100)) : {_colourHunger = _colour90;}; + case((_hunger >= 80) && (_hunger < 90)) : {_colourHunger = _colour80;}; + case((_hunger >= 70) && (_hunger < 80)) : {_colourHunger = _colour70;}; + case((_hunger >= 60) && (_hunger < 70)) : {_colourHunger = _colour60;}; + case((_hunger >= 50) && (_hunger < 60)) : {_colourHunger = _colour50;}; + case((_hunger >= 40) && (_hunger < 50)) : {_colourHunger = _colour40;}; + case((_hunger >= 30) && (_hunger < 40)) : {_colourHunger = _colour30;}; + case((_hunger >= 20) && (_hunger < 30)) : {_colourHunger = _colour20;}; + case((_hunger >= 10) && (_hunger < 20)) : {_colourHunger = _colour10;}; + case((_hunger >= 1) && (_hunger < 10)) : {_colourHunger = _colour0;}; + case(_hunger < 1) : {_colourHunger = _colourDead;}; + }; + + //Thirst + _colourThirst = _colourDefault; + switch true do{ + case(_thirst >= 100) : {_colourThirst = _colour100;}; + case((_thirst >= 90) && (_thirst < 100)) : {_colourThirst = _colour90;}; + case((_thirst >= 80) && (_thirst < 90)) : {_colourThirst = _colour80;}; + case((_thirst >= 70) && (_thirst < 80)) : {_colourThirst = _colour70;}; + case((_thirst >= 60) && (_thirst < 70)) : {_colourThirst = _colour60;}; + case((_thirst >= 50) && (_thirst < 60)) : {_colourThirst = _colour50;}; + case((_thirst >= 40) && (_thirst < 50)) : {_colourThirst = _colour40;}; + case((_thirst >= 30) && (_thirst < 40)) : {_colourThirst = _colour30;}; + case((_thirst >= 20) && (_thirst < 30)) : {_colourThirst = _colour20;}; + case((_thirst >= 10) && (_thirst < 20)) : {_colourThirst = _colour10;}; + case((_thirst >= 1) && (_thirst < 10)) : {_colourThirst = _colour0;}; + case(_thirst < 1) : {_colourThirst = _colourDead;}; + }; + + //Energy + _colourEnergy = _colourDefault; + switch true do{ + case(_energyPercent >= 100) : {_colourEnergy = _colour100;}; + case((_energyPercent >= 90) && (_energyPercent < 100)) : {_colourEnergy = _colour90;}; + case((_energyPercent >= 80) && (_energyPercent < 90)) : {_colourEnergy = _colour80;}; + case((_energyPercent >= 70) && (_energyPercent < 80)) : {_colourEnergy = _colour70;}; + case((_energyPercent >= 60) && (_energyPercent < 70)) : {_colourEnergy = _colour60;}; + case((_energyPercent >= 50) && (_energyPercent < 60)) : {_colourEnergy = _colour50;}; + case((_energyPercent >= 40) && (_energyPercent < 50)) : {_colourEnergy = _colour40;}; + case((_energyPercent >= 30) && (_energyPercent < 40)) : {_colourEnergy = _colour30;}; + case((_energyPercent >= 20) && (_energyPercent < 30)) : {_colourEnergy = _colour20;}; + case((_energyPercent >= 10) && (_energyPercent < 20)) : {_colourEnergy = _colour10;}; + case((_energyPercent >= 1) && (_energyPercent < 10)) : {_colourEnergy = _colour0;}; + case(_energyPercent < 1) : {_colourEnergy = _colour0;}; + }; + + //Toxicity + _colourToxicity = _colourDefault; + switch true do{ + case(_toxPercent >= 100) : {_colourToxicity = _colourDead;}; + case((_toxPercent >= 90) && (_toxPercent < 100)) : {_colourToxicity = _colour0;}; + case((_toxPercent >= 80) && (_toxPercent < 90)) : {_colourToxicity = _colour10;}; + case((_toxPercent >= 70) && (_toxPercent < 80)) : {_colourToxicity = _colour20;}; + case((_toxPercent >= 60) && (_toxPercent < 70)) : {_colourToxicity = _colour30;}; + case((_toxPercent >= 50) && (_toxPercent < 60)) : {_colourToxicity = _colour40;}; + case((_toxPercent >= 40) && (_toxPercent < 50)) : {_colourToxicity = _colour50;}; + case((_toxPercent >= 30) && (_toxPercent < 40)) : {_colourToxicity = _colour60;}; + case((_toxPercent >= 20) && (_toxPercent < 30)) : {_colourToxicity = _colour70;}; + case((_toxPercent >= 10) && (_toxPercent < 20)) : {_colourToxicity = _colour80;}; + case((_toxPercent >= 1) && (_toxPercent < 10)) : {_colourToxicity = _colour90;}; + case(_toxPercent < 1) : {_colourToxicity = _colour100;}; + }; + + //Stamina + _colourStamina = _colourDefault; + + ((uiNamespace getVariable "statusBar")displayCtrl 55555)ctrlSetStructuredText parseText + format[" + %2 + %3%1 + %4 + %5%1 + %6%1 + %9 + %18 + %8%1 + %19:%20 + FPS: %7 + GRIDREF: %16", + "%", + _players, + _damage, + _wallet, + _hunger, + _thirst, + _serverFPS, + _energyPercent, + _stamina, + _colourDefault, + _colourDamage, + _colourHunger, + _colourThirst, + _colourEnergy, + _colourStamina, + format["%1/%2",_xx,_yy], + _colourToxicity, + _toxPercent, + _hours, + _minutes + + + ]; + }; +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar_WS.sqf b/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar_WS.sqf new file mode 100644 index 0000000..a0858b2 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/addons/status_bar/adminBar_WS.sqf @@ -0,0 +1,203 @@ +waitUntil {!(isNull (findDisplay 46))}; +disableSerialization; + + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + systemChat format["Loading Admin info...", _rscLayer]; + [] spawn { + + sleep 5; + //set the color values. + //Additional color codes can be found here: http://html-color-codes.com/ + _colourDefault = parseText "#ADADAD"; //set your default colour here + _colour100 = parseText "#336600"; + _colour90 = parseText "#339900"; + _colour80 = parseText "#33CC00"; + _colour70 = parseText "#33FF00"; + _colour60 = parseText "#66FF00"; + _colour50 = parseText "#CCFF00"; + _colour40 = parseText "#CCCC00"; + _colour30 = parseText "#CC9900"; + _colour20 = parseText "#CC6600"; + _colour10 = parseText "#CC3300"; + _colour0 = parseText "#CC0000"; + _colourDead = parseText "#000000"; + + + + while {true} do + { + + sleep 1; + + //moved the creation of the status bar inside the loop and create it if it is null, + //this is to handle instance where the status bar is disappearing + if(isNull ((uiNamespace getVariable "statusBar")displayCtrl 55555)) then + { + diag_log "statusbar is null create"; + disableSerialization; + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + }; + + //initialize variables and set values + _unit = _this select 0; + _damage = round ((1 - (damage player)) * 100); + _hunger = round((EPOCH_playerHunger/5000) * 100); + _thirst = round((EPOCH_playerThirst/2500) * 100); + _wallet = EPOCH_playerCrypto; + _stamina = round(EPOCH_playerStamina * 100) / 100; + _energy = round(EPOCH_playerEnergy); + _toxPercent = round (EPOCH_playerToxicity); + _energyPercent = floor((_energy / 2500 ) * 100); + _serverFPS = if (typeName EPOCH_diag_fps == "SCALAR") then [{EPOCH_diag_fps},{"MANIPULATED"}], + _pos = getPosATL player; //switch to this below if you want to have world space coords displayed instead of gridref + _dir = getDir (vehicle player); + _grid = mapGridPosition player; _xx = (format[_grid]) select [0,3]; + _yy = (format[_grid]) select [3,3]; + _time = (round(240-(serverTime)/60)); //edit the '240' value (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals + _hours = (floor(_time/60)); + _minutes = (_time - (_hours * 60)); + _players = (count playableunits -1); + + switch(_minutes) do { + case 9: {_minutes = "09"}; + case 8: {_minutes = "08"}; + case 7: {_minutes = "07"}; + case 6: {_minutes = "06"}; + case 5: {_minutes = "05"}; + case 4: {_minutes = "04"}; + case 3: {_minutes = "03"}; + case 2: {_minutes = "02"}; + case 1: {_minutes = "01"}; + case 0: {_minutes = "00"}; + }; + + //Colour coding + //Damage + _colourDamage = _colourDefault; + + switch true do { + case(_damage >= 100) : {_colourDamage = _colour100;}; + case((_damage >= 90) && (_damage < 100)) : {_colourDamage = _colour90;}; + case((_damage >= 80) && (_damage < 90)) : {_colourDamage = _colour80;}; + case((_damage >= 70) && (_damage < 80)) : {_colourDamage = _colour70;}; + case((_damage >= 60) && (_damage < 70)) : {_colourDamage = _colour60;}; + case((_damage >= 50) && (_damage < 60)) : {_colourDamage = _colour50;}; + case((_damage >= 40) && (_damage < 50)) : {_colourDamage = _colour40;}; + case((_damage >= 30) && (_damage < 40)) : {_colourDamage = _colour30;}; + case((_damage >= 20) && (_damage < 30)) : {_colourDamage = _colour20;}; + case((_damage >= 10) && (_damage < 20)) : {_colourDamage = _colour10;}; + case((_damage >= 1) && (_damage < 10)) : {_colourDamage = _colour0;}; + case(_damage < 1) : {_colourDamage = _colourDead;}; + }; + + + //Hunger + _colourHunger = _colourDefault; + switch true do { + case(_hunger >= 100) : {_colourHunger = _colour100;}; + case((_hunger >= 90) && (_hunger < 100)) : {_colourHunger = _colour90;}; + case((_hunger >= 80) && (_hunger < 90)) : {_colourHunger = _colour80;}; + case((_hunger >= 70) && (_hunger < 80)) : {_colourHunger = _colour70;}; + case((_hunger >= 60) && (_hunger < 70)) : {_colourHunger = _colour60;}; + case((_hunger >= 50) && (_hunger < 60)) : {_colourHunger = _colour50;}; + case((_hunger >= 40) && (_hunger < 50)) : {_colourHunger = _colour40;}; + case((_hunger >= 30) && (_hunger < 40)) : {_colourHunger = _colour30;}; + case((_hunger >= 20) && (_hunger < 30)) : {_colourHunger = _colour20;}; + case((_hunger >= 10) && (_hunger < 20)) : {_colourHunger = _colour10;}; + case((_hunger >= 1) && (_hunger < 10)) : {_colourHunger = _colour0;}; + case(_hunger < 1) : {_colourHunger = _colourDead;}; + }; + + //Thirst + _colourThirst = _colourDefault; + switch true do{ + case(_thirst >= 100) : {_colourThirst = _colour100;}; + case((_thirst >= 90) && (_thirst < 100)) : {_colourThirst = _colour90;}; + case((_thirst >= 80) && (_thirst < 90)) : {_colourThirst = _colour80;}; + case((_thirst >= 70) && (_thirst < 80)) : {_colourThirst = _colour70;}; + case((_thirst >= 60) && (_thirst < 70)) : {_colourThirst = _colour60;}; + case((_thirst >= 50) && (_thirst < 60)) : {_colourThirst = _colour50;}; + case((_thirst >= 40) && (_thirst < 50)) : {_colourThirst = _colour40;}; + case((_thirst >= 30) && (_thirst < 40)) : {_colourThirst = _colour30;}; + case((_thirst >= 20) && (_thirst < 30)) : {_colourThirst = _colour20;}; + case((_thirst >= 10) && (_thirst < 20)) : {_colourThirst = _colour10;}; + case((_thirst >= 1) && (_thirst < 10)) : {_colourThirst = _colour0;}; + case(_thirst < 1) : {_colourThirst = _colourDead;}; + }; + + //Energy + _colourEnergy = _colourDefault; + switch true do{ + case(_energyPercent >= 100) : {_colourEnergy = _colour100;}; + case((_energyPercent >= 90) && (_energyPercent < 100)) : {_colourEnergy = _colour90;}; + case((_energyPercent >= 80) && (_energyPercent < 90)) : {_colourEnergy = _colour80;}; + case((_energyPercent >= 70) && (_energyPercent < 80)) : {_colourEnergy = _colour70;}; + case((_energyPercent >= 60) && (_energyPercent < 70)) : {_colourEnergy = _colour60;}; + case((_energyPercent >= 50) && (_energyPercent < 60)) : {_colourEnergy = _colour50;}; + case((_energyPercent >= 40) && (_energyPercent < 50)) : {_colourEnergy = _colour40;}; + case((_energyPercent >= 30) && (_energyPercent < 40)) : {_colourEnergy = _colour30;}; + case((_energyPercent >= 20) && (_energyPercent < 30)) : {_colourEnergy = _colour20;}; + case((_energyPercent >= 10) && (_energyPercent < 20)) : {_colourEnergy = _colour10;}; + case((_energyPercent >= 1) && (_energyPercent < 10)) : {_colourEnergy = _colour0;}; + case(_energyPercent < 1) : {_colourEnergy = _colour0;}; + }; + + //Toxicity + _colourToxicity = _colourDefault; + switch true do{ + case(_toxPercent >= 100) : {_colourToxicity = _colourDead;}; + case((_toxPercent >= 90) && (_toxPercent < 100)) : {_colourToxicity = _colour0;}; + case((_toxPercent >= 80) && (_toxPercent < 90)) : {_colourToxicity = _colour10;}; + case((_toxPercent >= 70) && (_toxPercent < 80)) : {_colourToxicity = _colour20;}; + case((_toxPercent >= 60) && (_toxPercent < 70)) : {_colourToxicity = _colour30;}; + case((_toxPercent >= 50) && (_toxPercent < 60)) : {_colourToxicity = _colour40;}; + case((_toxPercent >= 40) && (_toxPercent < 50)) : {_colourToxicity = _colour50;}; + case((_toxPercent >= 30) && (_toxPercent < 40)) : {_colourToxicity = _colour60;}; + case((_toxPercent >= 20) && (_toxPercent < 30)) : {_colourToxicity = _colour70;}; + case((_toxPercent >= 10) && (_toxPercent < 20)) : {_colourToxicity = _colour80;}; + case((_toxPercent >= 1) && (_toxPercent < 10)) : {_colourToxicity = _colour90;}; + case(_toxPercent < 1) : {_colourToxicity = _colour100;}; + }; + + //Stamina + _colourStamina = _colourDefault; + + //display the information + ((uiNamespace getVariable "statusBar")displayCtrl 55555)ctrlSetStructuredText parseText + format[" + %2 + %3%1 + %4 + %5%1 + %6%1 + %9 + %19 + %8%1 + FPS: %7 + POS: %16 + DIR: %17", + "%", + _players, + _damage, + _wallet, + _hunger, + _thirst, + _serverFPS, + _energyPercent, + _stamina, + _colourDefault, + _colourDamage, + _colourHunger, + _colourThirst, + _colourEnergy, + _colourStamina, + _pos, + _dir, + _colourToxicity, + _toxPercent + ]; + + }; +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/init_statusBar.sqf b/Server/mpmissions/epoch.Bornholm/addons/status_bar/init_statusBar.sqf new file mode 100644 index 0000000..11e51b5 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/addons/status_bar/init_statusBar.sqf @@ -0,0 +1,32 @@ +waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; +waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])}; +waitUntil {!isNull player}; +waitUntil {!(isNull (findDisplay 46))}; + +//Status Bar Config and Startup Options + +//Choose Options +//-------------------------------------------------------------------------------------------------------------------------------------- +_WSC = false; //Option whether to use and display world space coords in the admin status bar (true or false) + + +_sb_admin_list = ["76561198031039372"]; +//-------------------------------------------------------------------------------------------------------------------------------------- + +//Start the Status Bar + +if ((getPlayerUID player) in _sb_admin_list) then //admins id here +{ + if (_WSC) then + { + [] execVM "addons\status_bar\adminbar_ws.sqf"; + } + else + { + [] execVM "addons\status_bar\adminbar.sqf"; + }; +} +else +{ + [] execVM "addons\status_bar\PlayerBar.sqf"; +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/playerBar.sqf b/Server/mpmissions/epoch.Bornholm/addons/status_bar/playerBar.sqf new file mode 100644 index 0000000..3334646 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/addons/status_bar/playerBar.sqf @@ -0,0 +1,209 @@ +waitUntil {!(isNull (findDisplay 46))}; +disableSerialization; + + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + systemChat format["Loading Player info...", _rscLayer]; + [] spawn { + + sleep 5; + //set the color values. + //Additional color codes can be found here: http://html-color-codes.com/ + _colourDefault = parseText "#ADADAD"; //set your default colour here + _colour100 = parseText "#336600"; + _colour90 = parseText "#339900"; + _colour80 = parseText "#33CC00"; + _colour70 = parseText "#33FF00"; + _colour60 = parseText "#66FF00"; + _colour50 = parseText "#CCFF00"; + _colour40 = parseText "#CCCC00"; + _colour30 = parseText "#CC9900"; + _colour20 = parseText "#CC6600"; + _colour10 = parseText "#CC3300"; + _colour0 = parseText "#CC0000"; + _colourDead = parseText "#000000"; + + + while {true} do + { + sleep 1; + + //moved the creation of the status bar inside the loop and create it if it is null, + //this is to handle instance where the status bar is disappearing + if(isNull ((uiNamespace getVariable "statusBar")displayCtrl 55555)) then + { + diag_log "statusbar is null create"; + disableSerialization; + _rscLayer = "statusBar" call BIS_fnc_rscLayer; + _rscLayer cutRsc["statusBar","PLAIN"]; + }; + + //initialize variables and set values + _unit = _this select 0; + _damage = round ((1 - (damage player)) * 100); + //_damage = (round(_damage * 100)); + _hunger = round((EPOCH_playerHunger/5000) * 100); + _thirst = round((EPOCH_playerThirst/2500) * 100); + _wallet = EPOCH_playerCrypto; + _stamina = round(EPOCH_playerStamina * 100) / 100; + _toxPercent = round (EPOCH_playerToxicity); + _energy = round(EPOCH_playerEnergy); + _energyPercent = floor((_energy / 2500 ) * 100); + _fps = format["%1", diag_fps]; + _grid = mapGridPosition player; + _xx = (format[_grid]) select [0,3]; + _yy = (format[_grid]) select [3,3]; + _time = (round(240-(serverTime)/60)); //edit the '240' value (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals + _hours = (floor(_time/60)); + _minutes = (_time - (_hours * 60)); + _players = (count playableUnits -1); + + + switch(_minutes) do { + case 9: {_minutes = "09"}; + case 8: {_minutes = "08"}; + case 7: {_minutes = "07"}; + case 6: {_minutes = "06"}; + case 5: {_minutes = "05"}; + case 4: {_minutes = "04"}; + case 3: {_minutes = "03"}; + case 2: {_minutes = "02"}; + case 1: {_minutes = "01"}; + case 0: {_minutes = "00"}; + }; + + + //Colour coding + //Damage + _colourDamage = _colourDefault; + + switch true do { + case(_damage >= 100) : {_colourDamage = _colour100;}; + case((_damage >= 90) && (_damage < 100)) : {_colourDamage = _colour90;}; + case((_damage >= 80) && (_damage < 90)) : {_colourDamage = _colour80;}; + case((_damage >= 70) && (_damage < 80)) : {_colourDamage = _colour70;}; + case((_damage >= 60) && (_damage < 70)) : {_colourDamage = _colour60;}; + case((_damage >= 50) && (_damage < 60)) : {_colourDamage = _colour50;}; + case((_damage >= 40) && (_damage < 50)) : {_colourDamage = _colour40;}; + case((_damage >= 30) && (_damage < 40)) : {_colourDamage = _colour30;}; + case((_damage >= 20) && (_damage < 30)) : {_colourDamage = _colour20;}; + case((_damage >= 10) && (_damage < 20)) : {_colourDamage = _colour10;}; + case((_damage >= 1) && (_damage < 10)) : {_colourDamage = _colour0;}; + case(_damage < 1) : {_colourDamage = _colourDead;}; + }; + + //Hunger + _colourHunger = _colourDefault; + switch true do { + case(_hunger >= 100) : {_colourHunger = _colour100;}; + case((_hunger >= 90) && (_hunger < 100)) : {_colourHunger = _colour90;}; + case((_hunger >= 80) && (_hunger < 90)) : {_colourHunger = _colour80;}; + case((_hunger >= 70) && (_hunger < 80)) : {_colourHunger = _colour70;}; + case((_hunger >= 60) && (_hunger < 70)) : {_colourHunger = _colour60;}; + case((_hunger >= 50) && (_hunger < 60)) : {_colourHunger = _colour50;}; + case((_hunger >= 40) && (_hunger < 50)) : {_colourHunger = _colour40;}; + case((_hunger >= 30) && (_hunger < 40)) : {_colourHunger = _colour30;}; + case((_hunger >= 20) && (_hunger < 30)) : {_colourHunger = _colour20;}; + case((_hunger >= 10) && (_hunger < 20)) : {_colourHunger = _colour10;}; + case((_hunger >= 1) && (_hunger < 10)) : {_colourHunger = _colour0;}; + case(_hunger < 1) : {_colourHunger = _colourDead;}; + }; + + //Thirst + _colourThirst = _colourDefault; + switch true do{ + + case(_thirst >= 100) : {_colourThirst = _colour100;}; + case((_thirst >= 90) && (_thirst < 100)) : {_colourThirst = _colour90;}; + case((_thirst >= 80) && (_thirst < 90)) : {_colourThirst = _colour80;}; + case((_thirst >= 70) && (_thirst < 80)) : {_colourThirst = _colour70;}; + case((_thirst >= 60) && (_thirst < 70)) : {_colourThirst = _colour60;}; + case((_thirst >= 50) && (_thirst < 60)) : {_colourThirst = _colour50;}; + case((_thirst >= 40) && (_thirst < 50)) : {_colourThirst = _colour40;}; + case((_thirst >= 30) && (_thirst < 40)) : {_colourThirst = _colour30;}; + case((_thirst >= 20) && (_thirst < 30)) : {_colourThirst = _colour20;}; + case((_thirst >= 10) && (_thirst < 20)) : {_colourThirst = _colour10;}; + case((_thirst >= 1) && (_thirst < 10)) : {_colourThirst = _colour0;}; + case(_thirst < 1) : {_colourThirst = _colourDead;}; + }; + + //Energy + _colourEnergy = _colourDefault; + switch true do{ + + case(_energyPercent >= 100) : {_colourEnergy = _colour100;}; + case((_energyPercent >= 90) && (_energyPercent < 100)) : {_colourEnergy = _colour90;}; + case((_energyPercent >= 80) && (_energyPercent < 90)) : {_colourEnergy = _colour80;}; + case((_energyPercent >= 70) && (_energyPercent < 80)) : {_colourEnergy = _colour70;}; + case((_energyPercent >= 60) && (_energyPercent < 70)) : {_colourEnergy = _colour60;}; + case((_energyPercent >= 50) && (_energyPercent < 60)) : {_colourEnergy = _colour50;}; + case((_energyPercent >= 40) && (_energyPercent < 50)) : {_colourEnergy = _colour40;}; + case((_energyPercent >= 30) && (_energyPercent < 40)) : {_colourEnergy = _colour30;}; + case((_energyPercent >= 20) && (_energyPercent < 30)) : {_colourEnergy = _colour20;}; + case((_energyPercent >= 10) && (_energyPercent < 20)) : {_colourEnergy = _colour10;}; + case((_energyPercent >= 1) && (_energyPercent < 10)) : {_colourEnergy = _colour0;}; + case(_energyPercent < 1) : {_colourEnergy = _colour0;}; + }; + + //Toxicity + _colourToxicity = _colourDefault; + switch true do{ + case(_toxPercent >= 100) : {_colourToxicity = _colourDead;}; + case((_toxPercent >= 90) && (_toxPercent < 100)) : {_colourToxicity = _colour0;}; + case((_toxPercent >= 80) && (_toxPercent < 90)) : {_colourToxicity = _colour10;}; + case((_toxPercent >= 70) && (_toxPercent < 80)) : {_colourToxicity = _colour20;}; + case((_toxPercent >= 60) && (_toxPercent < 70)) : {_colourToxicity = _colour30;}; + case((_toxPercent >= 50) && (_toxPercent < 60)) : {_colourToxicity = _colour40;}; + case((_toxPercent >= 40) && (_toxPercent < 50)) : {_colourToxicity = _colour50;}; + case((_toxPercent >= 30) && (_toxPercent < 40)) : {_colourToxicity = _colour60;}; + case((_toxPercent >= 20) && (_toxPercent < 30)) : {_colourToxicity = _colour70;}; + case((_toxPercent >= 10) && (_toxPercent < 20)) : {_colourToxicity = _colour80;}; + case((_toxPercent >= 1) && (_toxPercent < 10)) : {_colourToxicity = _colour90;}; + case(_toxPercent < 1) : {_colourToxicity = _colour100;}; + }; + + //Stamina + _colourStamina = _colourDefault; + + //display the information + ((uiNamespace getVariable "statusBar")displayCtrl 55555)ctrlSetStructuredText parseText + format[" + %2 + %3%1 + %4 + %5%1 + %6%1 + %9 + %20 + %8%1 + FPS: %7 + GRIDREF: %16 + %17:%18", + "%", + _players, + _damage, + _wallet, + _hunger, + _thirst, + round diag_fps, + _energyPercent, + _stamina, + _colourDefault, + _colourDamage, + _colourHunger, + _colourThirst, + _colourEnergy, + _colourStamina, + format["%1/%2",_xx,_yy], + _hours, + _minutes, + _colourToxicity, + _toxPercent + + ]; + + + + + }; +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/addons/status_bar/statusBar.hpp b/Server/mpmissions/epoch.Bornholm/addons/status_bar/statusBar.hpp new file mode 100644 index 0000000..fadc40a --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/addons/status_bar/statusBar.hpp @@ -0,0 +1,34 @@ +#define ST_RIGHT 0x01 + +class statusBar { + idd = -1; + onLoad = "uiNamespace setVariable ['statusBar', _this select 0]"; + onUnload = "uiNamespace setVariable ['statusBar', objNull]"; + onDestroy = "uiNamespace setVariable ['statusBar', objNull]"; + fadein = 0; + fadeout = 0; + duration = 10e10; + movingEnable = 0; + controlsBackground[] = {}; + objects[] = {}; + class controls { + class statusBarText { + idc = 55555; + x = 0.185 * safezoneW + safezoneX; + y = 0.940044 * safezoneH + safezoneY; + w = 0.65 * safezoneW; + h = 0.0330033 * safezoneH; + shadow = 1; + colorBackground[] = { 0, 0, 0, 0.5 }; // make the last number in the array 0 to get rid of the background + font = "PuristaSemibold"; + size = "0.02 * safezoneH"; + type = 13; + style = 2; + text="loading player stats ..."; + class Attributes { + align="center"; + color = "#ffffff";//#5fe60c + }; + }; + }; +}; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/description.ext b/Server/mpmissions/epoch.Bornholm/description.ext index fff4605..4b4cf42 100644 --- a/Server/mpmissions/epoch.Bornholm/description.ext +++ b/Server/mpmissions/epoch.Bornholm/description.ext @@ -3,6 +3,7 @@ class RscTitles { + #include "addons\Status_Bar\statusBar.hpp" #include "VEMFr_client\gui\RscDisplayVEMFrClient.hpp" #include "VEMFr_client\gui\RscDisplayBaseAttack.hpp" }; diff --git a/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp b/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp index 7aa9e47..46ee7de 100644 --- a/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp +++ b/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp @@ -13,6 +13,16 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp */ +//added by Zepheris +class flip_vic +{ + condition = "dyna_isVehicle && !dyna_locked"; + action = "[dyna_cursorTarget] call FlipVic;"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_upgrade.paa"; + tooltip = "Flip Vehicle"; +}; +//end added by Zepheris + class build_upgrade { condition = "dyna_buildMode select 0"; @@ -615,5 +625,3 @@ class Defuse_Bomb icon = "x\addons\a3_epoch_code\Data\UI\buttons\Defuse.paa"; tooltip = "Defuse Bomb"; }; - - diff --git a/Server/mpmissions/epoch.Bornholm/init.sqf b/Server/mpmissions/epoch.Bornholm/init.sqf index bf59b6a..36ed58b 100644 --- a/Server/mpmissions/epoch.Bornholm/init.sqf +++ b/Server/mpmissions/epoch.Bornholm/init.sqf @@ -5,5 +5,15 @@ execVM "debug\blckClient.sqf"; if hasInterface then { + [] ExecVM "addons\Status_Bar\init_statusBar.sqf"; [] ExecVM "VEMFr_client\sqf\initClient.sqf"; // Client-side part of VEMFr + FlipVic = compileFinal preProcessFileLineNumbers "scripts\flip.sqf"; + execVM "scripts\playermarker.sqf"; }; + + + +//#include "A3EAI_Client\A3EAI_initclient.sqf"; + +//Advanced towing only tow 1 car +SA_MAX_TOWED_CARGO = 1; diff --git a/Server/mpmissions/epoch.Bornholm/scripts/flip.sqf b/Server/mpmissions/epoch.Bornholm/scripts/flip.sqf new file mode 100644 index 0000000..b98206c --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/scripts/flip.sqf @@ -0,0 +1,22 @@ + +private _flpVcl = _this select 0; +//if (local _flpVcl) then +//{ + _bbr = boundingBoxReal _flpVcl; + _p1 = _bbr select 0; + _p2 = _bbr select 1; + _maxHeight = abs ((_p2 select 2) - (_p1 select 2)); + _flpVcl allowDamage false; + _pos = getPosATL _flpVcl; + _pos set [2,(_pos select 2) + (_maxHeight)]; + _flpVcl setPosATL _pos; + _flpVcl setVectorUp [0, 0, 1]; + _flpVcl setVelocity [0,0,0]; + _flpVcl allowDamage true; + ["Flipped vehicle",5] call epoch_message; +//} else { + + // ["You were not the driver of this vehicle",5] call epoch_message; +//}; + + diff --git a/Server/mpmissions/epoch.Bornholm/scripts/playermarker.sqf b/Server/mpmissions/epoch.Bornholm/scripts/playermarker.sqf new file mode 100644 index 0000000..25b66e7 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/scripts/playermarker.sqf @@ -0,0 +1,51 @@ +/* +playerMarker.sqf +*/ +if (isServer) exitWith {}; + +private["_markers","_members"]; +_markers = []; +_members = []; + +while {true} do { + private["_hasGPS","_hasRadio"]; + sleep 1; + //diag_log format["assignedItems includes %1", assignedItems player]; + //diag_log format["Items includes %1", Items player]; + //diag_log format["magazines includes %1", magazines player]; + //diag_log format["weapons includes %1", weapons player]; + //_hasGPS = 'ItemGPS' in (assignedItems player); + //_hasRadio = "ItemRadio" in assignedItems player; + //diag_log format["_hasGPS = %1 and _hasRadio = %2",_hasGPS,_hasRadio]; + if(visibleMap) then { + _members = units (group player); + //Create markers + { + _marker = createMarkerLocal [format["%1_marker",_x],visiblePosition _x]; + _marker setMarkerColorLocal "ColorYellow"; + _marker setMarkerTypeLocal "Mil_dot"; + _marker setMarkerTextLocal format["%1", _x getVariable["realname",name _x]]; + + _markers pushBack [_marker,_x]; + } foreach _members; + + while {visibleMap} do { + { + private["_marker","_unit"]; + _marker = _x select 0; + _unit = _x select 1; + if(!isNil "_unit") then { + if(!isNull _unit) then { + _marker setMarkerPosLocal (visiblePosition _unit); + }; + }; + } foreach _markers; + if(!visibleMap) exitWith {}; + sleep 0.02; + }; + + {deleteMarkerLocal (_x select 0);} foreach _markers; + _markers = []; + _members = []; + }; +}; \ No newline at end of file