Jump to content

dimon

Member
  • Content Count

    212
  • Joined

  • Last visited

  • Medals

Everything posted by dimon

  1. There's actually a trigger is absolutely ridiculous! init.sqf if(!isServer || local player)then { FFA_SYSADMIN=((getPlayerUID player) in ["","",""]); if (isServer || FFA_SYSADMIN) then { [] execVM "Adminsys_menu.sqf"; }; }; ...and that's all!
  2. fnc_line [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] fnc_line1 [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]#[/color]define gpa[color="#8B3E2F"][b]([/b][/color]a[color="#8B3E2F"][b],[/b][/color]b[color="#8B3E2F"][b],[/b][/color]c[color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color]a [color="#191970"][b]select[/b][/color] c[color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]+[/b][/color][color="#8B3E2F"][b]([/b][/color]b [color="#191970"][b]select[/b][/color] c[color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]/[/b][/color][color="#FF0000"]2[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_ob1"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_ob2"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_m"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_ob1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color] [color="#191970"][b]typeName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#7A7A7A"]"OBJECT"[/color] [color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]getPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]typeName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#7A7A7A"]"STRING"[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]markerPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]else[/b][/color][color="#8B3E2F"][b]{[/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_ob2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color] [color="#191970"][b]typeName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#7A7A7A"]"OBJECT"[/color] [color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]getPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]typeName[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#7A7A7A"]"STRING"[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]markerPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#191970"][b]else[/b][/color][color="#8B3E2F"][b]{[/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_color[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createMarker[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]str[/b][/color] [color="#191970"][b]random[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#FF0000"]10000[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerShape[/b][/color] [color="#7A7A7A"]"RECTANGLE"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerBrush[/b][/color] [color="#7A7A7A"]"border"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerColor[/b][/color] [color="#1874CD"]_color[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerDir[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_ob1[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_ob2[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_DirTo[color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerPos[/b][/color] [color="#8B3E2F"][b][[/b][/color]gpa[color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_ob2[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_ob1[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color]gpa[color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_ob2[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_ob1[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_m[/color] [color="#191970"][b]setMarkerSize[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_ob1[/color] [color="#191970"][b]distance[/b][/color] [color="#1874CD"]_ob2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]/[/b][/color][color="#FF0000"]2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_arr1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_forEachIndex[/color] [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]-[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_arr1[/color] [color="#191970"][b]set[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]count[/b][/color] [color="#1874CD"]_arr1[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]select[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_forEachIndex[/color] [color="#FF0000"]+1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] fnc_line1[color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]//mark = ["m1","m2","m4","m3","m1"];[/i][/color] [color="#006400"][i]//mark = [s1,s2,s3,s4];[/i][/color] [color="#006400"][i]//[mark,"ColorRed"] call fnc_line;[/i][/color] [color="#006400"][i]//[ ["m1","m2","m4","m3","m1"],"ColorRed"] call fnc_line;[/i][/color] [color="#006400"][i]//[[s1,s2,s3,s4],"ColorRed"] call fnc_line;[/i][/color] :cool:
  3. That's right - you need to decide: either we do ACE or another mod by creating a sign by ACE.
  4. addaction so, too, will work AdminList = ["xxxxxxxxxx","xxxxxxxxx2"]; if ((getPlayerUID player) in AdminList) then { action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(vehicle player)==player"]; }; it was all complete crap... AdminList = ["xxxxxxxxxx","xxxxxxxxx2"]; if ((getPlayerUID player) in AdminList) then { action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(alive player) && (local player)"]; }; so to do badly: use BIS_MENU_GroupCommunication.
  5. AdminList = ["xxxxxxxxxx","xxxxxxxxx2"]; if ((getPlayerUID player) in AdminList) then { action1 = player addaction [("<t color=""#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","(vehicle player)==_target"]; };
  6. I quote from the article Code Optimisation: All right... private '_condition'; _condition=10; switch (true) do { case (_condition == 1):{}; case (_condition == 2):{}; case (_condition == 3):{}; case (_condition == 4):{}; case (_condition == 5):{}; case (_condition == 6):{}; case (_condition == 7):{}; case (_condition == 8):{}; case (_condition == 9):{}; case (_condition == 10):{}; }; ... will be slower than private '_condition'; _condition=10; call { if (_condition==1) exitwith {}; if (_condition==2) exitwith {}; if (_condition==3) exitwith {}; if (_condition==4) exitwith {}; if (_condition==5) exitwith {}; if (_condition==6) exitwith {}; if (_condition==7) exitwith {}; if (_condition==8) exitwith {}; if (_condition==9) exitwith {}; if (_condition==10) exitwith {}; }; But not everything is so simple.... private '_condition'; _condition=10; switch (_condition) do { case 1:{}; case 2:{}; case 3:{}; case 4:{}; case 5:{}; case 6:{}; case 7:{}; case 8:{}; case 9:{}; case 10:{}; };
  7. dimon

    CAll vs SWITCH

    While entering the game, with more than 200 online players, the server plenty of time become microseconds to seconds. And any important optimization: how to approach writing and reading speed of the code. ---------- Post added at 07:12 ---------- Previous post was at 07:04 ---------- Thank you. Always learn something from you new.
  8. dimon

    CAll vs SWITCH

    Yes, but the case could be so:
  9. dimon

    CAll vs SWITCH

    But they solve one problem?
  10. http://www.radikall.com/images/2015/04/10/qt5sH.jpg (680 kB) and the little man in the corner is that? also indicates that amazed... so look soon and scanner manual will be with the definition of a complete diagnosis. Not serious. Is the fighter unconscious, where it is wounded,it is unclear where the wounded, the battle, whence is the selection of blood... and then once you all information: sore leg and a little tummy.
  11. _var = _CSites select 0; hint format ["Pos: %1", _var];
  12. ---------- Post added at 11:20 ---------- Previous post was at 10:27 ---------- 2.3 Update Replaced by wholesalee: 1. All detached buildings. 2. All sheds. 3. The containers. 4. Church. 5. The sawmill. 6. The barracks. 7. Lesniki tower. 9. Some industrial buildings. Bugfix with attachments on the client in MP. script 2.3 script 2.3 lite script 2.3 very lite
  13. Yes, these buildings are taken from different Islands (Sahrani, Celle...), since we use an Assembly where all these Islands included - without this, alas, no way. For the fact that at least some compensation for Chernarus+ :) ---------- Post added at 14:38 ---------- Previous post was at 13:23 ---------- 2.2 Update http://i57.fastpic.ru/big/2015/0402/fa/27d14c189ce651bacdba5f626e3366fa.jpg (240 kB)
  14. in the first embodiment, the array was determined by the name classname if ((["Land_HouseV_",str (typeof _housev)] call KK_fnc_inString) || {(["Land_HouseV2_",str (typeof _housev)] call KK_fnc_inString)}) then { in the second version I did everything manually - each building was checked.
  15. 2.1 Update http://i57.fastpic.ru/big/2015/0402/f6/b8f582348e9d7e11229ebd775c6299f6.jpeg (157 kB) http://i67.fastpic.ru/big/2015/0402/3e/b2c51904510b02094511aced8d60583e.jpeg
  16. version 2 script Take into account the wishes of the fans of visual harmony - picked a building more suited to the atmosphere of the island. Went through all model building in size, become as whether there are any defects. http://i66.fastpic.ru/big/2015/0402/86/a656b7cba0e0b27fb4b309719bd10786.jpg (435 kB) http://i66.fastpic.ru/big/2015/0402/c2/936b856f854431f7c421e063637256c2.jpg (288 kB) http://i66.fastpic.ru/big/2015/0402/36/4a5078ca7ad5ac9ef524294262313e36.jpg (396 kB) mission example
  17. what is best of three ways ? //{_x AddEventHandler ["Killed",{deletevehicle _this;}]} foreach allunits; /* while {true} do { { if (!alive _x) then { deletevehicle _x; }; } foreach allunits; sleep 10; }; */ /* { _x spawn { while {true} do { if (!(alive _this)) exitwith { deletevehicle _this; }; sleep 10; }; }; } foreach allunits; */
  18. What would be better? { FFA_HOUSESCLIENT= FFA_HOUSES; (owner _x) publicVariableClient "FFA_HOUSESCLIENT"; } foreach playableUnits; or FFA_HOUSESCLIENT= FFA_HOUSES; publicVariable "FFA_HOUSESCLIENT";
  19. I also use this addPublicVariableEventHandler with switch... Now the question on optimization: is there a difference to use one addPublicVariableEventHandler with a switch, or use a lot addPublicVariableEventHandlers? Do addPublicVariableEventHandler bear all the burden?
  20. Well then I report an error: server commands #lock and #unlock if you write them in the chat is not working. The lock on the server is hung, but you can go unhindered. If you use a third-party program (such as EMP Rcon) and enter the commands panel of the program it works.
  21. rewrote the function fnc_line = { fnc_line1 = { #define gpa(a,b,c) (((a select c)+(b select c))/2) private ["_ob1","_ob2","_m"]; _ob1 = if ( typename (_this select 0) == "OBJECT" ) then {getpos (_this select 0)} else {if (typename (_this select 0) == "STRING") then {markerpos (_this select 0) }else{_this select 0};}; _ob2 = if ( typename (_this select 0) == "OBJECT" ) then {getpos (_this select 1)} else {if (typename (_this select 1) == "STRING") then {markerpos (_this select 1) }else{_this select 1};}; _color = _this select 2; _m = createMarker [str random(10000),[0,0]]; _m setMarkerShape "RECTANGLE"; _m setMarkerBrush "border"; _m setMarkerColor _color; _m setMarkerDir ([_ob1, _ob2] call BIS_fnc_DirTo); _m setmarkerpos [gpa(_ob2,_ob1,0),gpa(_ob2,_ob1,1),0]; _m setMarkerSize [0,(_ob1 distance _ob2)/2]; }; _arr1 = []; { if (_forEachIndex != ((count (_this select 0)) - 1)) then { _arr1 set [count _arr1,([_x, ((_this select 0) select (_forEachIndex +1)),_this select 1] call fnc_line1)]; }; } foreach (_this select 0); _arr1 }; mark = ["m1","m2","m4","m3","m1"]; //mark = [s1,s2,s3,s4]; [mark,"ColorRed"] call fnc_line;
  22. 2. Autor VVL99 the 2nd method is more easier, more economical and more practical: there is one marker of the rectangle with width 0 and with the right rotation between points. http://www.flashpoint.ru/attachments/arma2rft-2015-03-24-00-24-11-361-jpg.54285/ (300 kB) fnc_line = { #define gpa(a,b,c) (((getpos a select c)+(getpos b select c))/2) *** ***private ["_ob1","_ob2","_mm"]; *** *** _ob1 = _this select 0; *** *** _ob2 = _this select 1; *** *** _mm = _this select 2; *** *** _mm setMarkerShape "RECTANGLE"; *** *** _mm setMarkerBrush "border"; *** *** _mm setMarkerColor "ColorRed"; *** *** _mm setMarkerDir ([_ob1, _ob2] call BIS_fnc_DirTo); *** *** _mm setmarkerpos [gpa(_ob2,_ob1,0),gpa(_ob2,_ob1,1),0]; *** *** _mm setMarkerSize [0,(_ob1 distance _ob2)/2]; }; _mm = createMarker ["mm",getpos player]; [s1,s2,"mm"] call fnc_line; s1 - object, s2 - object, "mm" - marker example
×