Jump to content

LoonyWarrior

Member
  • Content Count

    110
  • Joined

  • Last visited

  • Medals

Everything posted by LoonyWarrior

  1. LoonyWarrior

    Virtual Ammobox System (VAS)

    https://community.bistudio.com/wiki/profileNamespace The variables are stored next to the user profile in a file named myUsername.vars.TakeOnHProfile (e.g. in the My Documents\Take On Helicopters folder).
  2. LoonyWarrior

    Hint server to all players?

    this is one of the BIGGEST mistakes u can do........ https://community.bistudio.com/wiki/exitWith THIS COMMAND DOESNT DO WHAT U THINK !!!! this function can be used only to exit FROM LOOP _someArray = [0,0,0,0,0,0,0]; { if (_x == 1) exitWith { _index = _forEachIndex; _value = _x; }; } forEach someArray; this is the only right way how to use this command... to achieve what u want.. if isDedicated then { // only dedicated }; if !isDedicated then { // live server // clients if !isServer then { // only clients }; }; if isServer then { // dedicated server // live server }; brackets re not needed for booleans............................................ DO NOT COPY NOOBS........................
  3. hi.. u can tune it even more and meke it as function.. in fact.. u should do so.. :) since it will be called repeatedly and there is no why u should compile it each time...... https://community.bistudio.com/wiki/execVM keep the content of your officer.sqf and rename it to TAG_fnc_setOfficer.sqf and in the init file add something like this... TAG_fnc_setOfficer = compileFinal preprocessFileLineNumbers "TAG_fnc_setOfficer.sqf"; _null = [] spawn { waitUntil { !isNull player && isPlayer player }; _null = player addEventHandler ["Respawn", { player call TAG_fnc_setOfficer; }]; }; and in the description.ext respawnOnStart = 1; init field this call TAG_fnc_setOfficer;
  4. u can send arrays in arrays... i tryed pass dedicated <-> client something like: [0, 0, 0, 0, [[true, false], [0, 0, 0], ["something", "something"]]] and it was ok...
  5. its really clever to say this on forum like this... my reaction: its good for You.. enjoy that..
  6. re u sure that u saw when we was registered ? he was registered in February... I was registered month ago... ? and do u think that i had to ask for anything like that to be able write in SQF ? i know that it wasnt nice from me... but honestly... HE DIDNT TRY and i simply have big problem with that... he isnt asking for something specific... if he will run to concrete problem i will try to help him... but not like this.... he tells us that he is java programmer and then he ask for basic questions witch can be found already aswered on wiki ? ...seriously? and then he talks about C++ and additional libraries and i shouldnt take it as joke..? once again... i know that it wasnt nice... but i said that from position of somebody who is only 1 month here and never had to ask for something like that................... think about that..... ---------- Post added at 16:17 ---------- Previous post was at 16:04 ---------- u re welcome.... and question is what u imagine under the "compilation"... ...lets say that compilation can be done automatically or manualy... if u execVM somescript... that script is automatically compiled... https://community.bistudio.com/wiki/execVM but u can also compile code manualy.. with https://community.bistudio.com/wiki/compile or better https://community.bistudio.com/wiki/compileFinal ....this is done while mission runs... it have nothing to do with editor............ so.... your question is ?
  7. is that reason why u cant use wiki ? http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 http://community.bistudio.com/wiki/Multiplayer_scripting http://community.bistudio.com/wiki/Locality_in_Multiplayer http://community.bistudio.com/wiki/Code_Optimisation http://community.bistudio.com/wiki/6thSense.eu:EG 1. ..then nothing 2. ?? .......no comment 3. sure 4. all sync is done automatically befor init.sqf 5. haha... that was nice one.. 6. re u searching on YouTube ? u know what... i really like smart guys like u re...
  8. LoonyWarrior

    getMarkerPos using an Array

    it was already done.... and u re also... selecting from nowhere.......
  9. dont be confused... :cool: all what that code says is that if u have undeclared parameters _this is empty array....
  10. myFunction1 = { if ((count _this) > 0) then { true; } else { false; }; }; _variable = call myFunction1; hint str _variable; this will return false if there is no parametr provided... no errors... but if u will pass the string it will end in error... because of type... it expects array...
  11. my point was... that this shouldnt happen.. u try to "cover" it in the function... but i believe that u should always pass "right" parameters... if u will do so.. u dont have to check if they re right.. and if u will provide wrong parameters u will get error message... i understand that your question is how to check if _this in called script isNil and all what can i say about that is that it really works as u described.......... ---------- Post added at 16:50 ---------- Previous post was at 16:24 ---------- ...there re two points that i dont understand 1. the thing about "allowing" wrong parameters 2. the idea of the function itself.... example: server if isServer then { TAG_someVariable = false; // now something happened TAG_someVariable = true; publicVariable "TAG_someVariable"; }; on clients connected at time of publishing u handle it with event handler.. for JIP clients all published variables re already declared at start of initialization (init.sqf) so all what u have to do is... client if !isServer then { if (!isNil "TAG_someVariable") then { // varialble already published do something // this should simply execute same function as event handler do for "normal" clients }; };
  12. thats exactly why i said that u try to create "bulletproof" function... but qustion is.... how can this happen? u shouldnt pass wrong parametrs and if u do so u should see error message about that... and all what your function do is that it hides this error message...........
  13. i cant help myself... but all what i see is that u try to hide error messages from users.. ? re u really sure about that? if i understand it right u re trying to create "bulletproof" function but all what it will do will be that it hide error messages from users... code should be always done in right way... and also... re u sure that u really need function like this ? isnt isNil enough ?
  14. i will watch my behaviour.. :cool:
  15. hi it should be something like TAG_fnc_doTheyKnow = compileFinal "{ playerDetected=false; { if ((_x knowsAbout player) > 1.49) then { playerDetected = true; }; } forEach (units _this); playerDetected; }"; if isServer then { _null = [] spawn { waitUntil { sleep 0.1; group1 call TAG_fnc_doTheyKnow }; // now they knows... do something... }; }; if u wish to do it repeatedly if isServer then { _null = [] spawn { while { true } do { waitUntil { sleep 0.1; group1 call TAG_fnc_doTheyKnow }; // now they knows... do something... sleep 30; }; }; };
  16. it's direct download now :)
  17. Upgrade ! BorderGuard version 1.3
  18. hi i have trigger and i want to create marker right next to it.. i know how to do that for fig. A where the angle of the trigger is 0 _area = triggerArea TriggerName; _position = [TriggerName, ((_area select 1) / 2) + 5, 0] call BIS_fnc_relPos; _marker = createMarker ["MarkerName", _position]; _marker setMarkerShape "RECTANGLE"; _marker setMarkerColor "ColorGreen"; _marker setMarkerSize [_area select 0, 10]; _marker setMarkerDir _area select 2; and i need to know how to do that for fig. B thx for advice...
  19. LoonyWarrior

    Positioning... ever green for me.. :(

    that was planned like next step... ...and now it looks like its already done.. :) really thanks... ...im working on implementation to the BorderGuard ;)
  20. LoonyWarrior

    Positioning... ever green for me.. :(

    there is no difference in my code and yours... ? // get trigger position and angle _area = triggerArea TriggerName; // create new position // u have rectangle 400x400 and u want marker with width 10 // u have to take half.... from each value....... 200 + 5 _position = [TriggerName, ((_area select 1) / 2) + 5, 0] call BIS_fnc_relPos; // create marker _marker = createMarker ["MarkerName", _position]; _marker setMarkerShape "RECTANGLE"; _marker setMarkerColor "ColorGreen"; // set marker size... 400x10 _marker setMarkerSize [_area select 0, 10]; // set same angle as trigger _marker setMarkerDir _area select 2; ---------- Post added at 19:50 ---------- Previous post was at 18:58 ---------- oki i finally got that... thanks... _area2 = triggerArea LW_OuterBorder; _position1 = [LW_OuterBorder, (_area2 select 1) + 10, (_area2 select 2) + 180] call BIS_fnc_relPos; _marker2 = createMarker ["Marker2", _position1]; _marker2 setMarkerShape "RECTANGLE"; _marker2 setMarkerColor "ColorBlack"; _marker2 setMarkerSize [(_area2 select 0) + 20, 10]; _marker2 setMarkerDir (_area2 select 2); _position2 = [LW_OuterBorder, (_area2 select 0) + 10, (_area2 select 2) + 270] call BIS_fnc_relPos; _marker3 = createMarker ["Marker3", _position2]; _marker3 setMarkerShape "RECTANGLE"; _marker3 setMarkerColor "ColorBlack"; _marker3 setMarkerSize [_area2 select 1, 10]; _marker3 setMarkerDir ((_area2 select 2) + 90); _position3 = [LW_OuterBorder, (_area2 select 1) + 10, (_area2 select 2)] call BIS_fnc_relPos; _marker4 = createMarker ["Marker4", _position3]; _marker4 setMarkerShape "RECTANGLE"; _marker4 setMarkerColor "ColorBlack"; _marker4 setMarkerSize [(_area2 select 0) + 20, 10]; _marker4 setMarkerDir (_area2 select 2); _position4 = [LW_OuterBorder, (_area2 select 0) + 10, (_area2 select 2) + 90] call BIS_fnc_relPos; _marker5 = createMarker ["Marker5", _position4]; _marker5 setMarkerShape "RECTANGLE"; _marker5 setMarkerColor "ColorBlack"; _marker5 setMarkerSize [_area2 select 1, 10]; _marker5 setMarkerDir (_area2 select 2) + 90;
  21. LoonyWarrior

    variable title addActions

    some basics....
  22. LoonyWarrior

    variable title addActions

    _addaction = amo addAction [_myname,"scripts\rearm.sqf"]; no quotes... its variable... with the quotes its string...
  23. LoonyWarrior

    Running a script on the server

    im very sorry but i cant take u seriously.. u should probably try something easier to do... anyway because i respect that everyone had to start once.... i will try to answer... u will have to do a lot of things.. this what u re talking about is just very very beginning of what have to be done.. 1. functionReportPlayer (client side) in this function u have to publicVariableServer the killer, this function will be executed in onPlayerKilled.sqf 2. eventHandler (server side) this event handler should execute functionPunishPlayer 3. functionPunishPlayer (server side) in this function u have to publicVariableClient to the killer 4. eventHandler (client side) this event handler should execute functionPunish 5. functionPunish (client side) this function punish the killer if u really want to do this look at scripts that re already done...............
  24. if is that reaction on 'TAG_' my reaction is: i always suppose that my code will be used by somebody else...
×