Jump to content

fight9

Member
  • Content Count

    382
  • Joined

  • Last visited

  • Medals

Everything posted by fight9

  1. [b]// isnt [i]_this select 0[/i] the unit?[/b] waitUntil { !isNull (_this select 0) };
  2. Well, there are a few problems here. The main ones being that the spot1 variable only exists on the server and setHit is an argument local command. The first problem can be fixed by using publicVariable on spot1 to broadcast it to everyone. Then we use a waitUntil and isNil to hold clients until they receive that variable. However, since we are using a waitUntil, we have to move the code to a different scheduled thread than what the init.sqf runs in (you shouldn't stop the init.sqf). Finally, we add the addActions but this time using BIS_fnc_MP and its CfgRemoteExecCommands functionality to run the setHits in the code blocks. All in all, it will look like this. I haven't tested it, though... [color="#FF8040"][color="#006400"][i]// server only code[/i][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// why are you using this marker?[/i][/color] [color="#191970"][b]createMarker[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"spot1mkr"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]6469.65[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]5311.91[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]14.7677[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] spot1 [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Land_PortableLight_double_F"[/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]getMarkerPos[/b][/color] [color="#7A7A7A"]"spot1mkr"[/color][color="#8B3E2F"][b],[/b][/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="#7A7A7A"]"none"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] spot1 [color="#191970"][b]setDir[/b][/color] [color="#FF0000"]90[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// send variable to clients[/i][/color] [color="#191970"][b]publicVariable[/b][/color] [color="#7A7A7A"]"spot1"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// global code in new thread[/i][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]spawn[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// wait for variable to exist[/i][/color] [color="#191970"][b]waitUntil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#191970"][b]isNil[/b][/color] [color="#8B3E2F"][b]{[/b][/color]spot1[color="#8B3E2F"][b]}[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// add actions[/i][/color] [color="#1874CD"]_off[/color] [color="#8B3E2F"][b]=[/b][/color] spot1 [color="#191970"][b]addAction[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Turn Off"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// setHit on light owner via BIS_fnc_MP[/i][/color] [color="#1874CD"]_h1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Light_1_hitpoint"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"setHit"[/color][color="#8B3E2F"][b],[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_h2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Light_2_hitpoint"[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]1[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"setHit"[/color][color="#8B3E2F"][b],[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_on[/color] [color="#8B3E2F"][b]=[/b][/color] spot1 [color="#191970"][b]addAction[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Turn On"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_h1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Light_1_hitpoint"[/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="#7A7A7A"]"setHit"[/color][color="#8B3E2F"][b],[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_h2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Light_2_hitpoint"[/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="#7A7A7A"]"setHit"[/color][color="#8B3E2F"][b],[/b][/color]spot1[color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[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] Made with KK's SQF to BBCode Converter Welcome to multiplayer scripting... its complicated.
  3. You are waiting for TFAR to do its work first. So, the sleep time is really indeterminable. You can also put this in the INIT.sqf to stop everyone from getting the DAGR TF_give_microdagr_to_soldier = false;
  4. You can use a setVariable (global) and getVariable for locking the doors... But for the get in and out actions, I don't know. That stuff is defined in the model. I havent been able to find how to set a condition on that.
  5. Yeah, there is probably a fancier way to detected when the unit has the DAGR, but the sleep method works well enough... Also, I changed the vest function above a bit. I didn't like my usage of the exitWith so I changed it to the opposite. It now exits if a vest was not selected correctly instead of exiting with the vest addition. Its just cleaner and easier to read...
  6. BIS_fnc_spawnObjects might be able to help speed that process up. It gets the bounding box for an object (a table, perhaps), and then spawns an object on top of it (a computer, perhaps). You can change the offset, direction, and amount of objects in the function parameters.
  7. The setup on your vest function is a little off. Use this instead. // [_RSF,1] spawn fnc_giveVestRSF; -- adds "rhs_6sh92" // [_unit,3] spawn fnc_giveVestRSF; -- adds "rhs_6sh92_digi" // 1-4 for different vests - returns true if vest was selected correctly fnc_giveVestRSF = { private "_vest"; _vest = switch (_this select 1) do { case 1:{"rhs_6sh92"}; case 2:{"rhs_6sh92_digi_headset"}; case 3:{"rhs_6sh92_digi"}; case 4:{"rhs_6sh92_headset"}; default {""}; }; if (_vest == "") exitWith {false}; (_this select 0) addVest _vest; true; }; They work great together... its something else. EDIT: make sure those classnames are right for the vests. The word "headset" in them makes me doubt... EDIT 2: Changed exitWith to opposite usage... cleaner that way.
  8. Using CfgFunctions also allows you to use that function in a units INIT field without having schedule it with a sleep.
  9. Have you tried just using a JPEG rather than a PAA from texView? I have a re textured PC monitor in a project I am working on... I use a JPEG file and have not seen this problem. Edit: good looking office btw. I've always wanted to take the time to do something like that.
  10. Switch the two lines in your INIT.sqf. You are calling the function before defining it.
  11. Where are you calling MM.sqf?
  12. diag_log format["[%1] Parameters received: [color="#B22222"][b]%2[/b][/color].", _scriptname, _this];
  13. Just make a frame box in the GUI editor and then change it in the exported files. Progress bars are pretty easy. You can find all the information you need here.
  14. Glad I can help. I needed help at this exact step when I started with my first dialog. There is a hole in the wiki between creating the dialog and adding data with scripting commands. There is no information on how to get from one step to the other. The onLoad uiEventHandler is the key here but it is not really mentioned that way. I hope this gets you started with filling that gap.
  15. Okay, I'll try to answer your questions the best I can. 1. This is what I have for my own RscListBox basic defines... Obviously you will need to adjust colors. The wiki has its own basic define here.
  16. idc is the identification number for a control. You use it to select a control for scripting. Access is used to define if you can read or write on a control. You can find lots of information about different controls here. Okay, first you need to create a dialog under class controls. If you read the tutorials then you know we create all of our base classes in the defines.hpp. All that data is just default stuff. Its used to standardize things across your dialog. All of your dialog classes should inherent from your base defines. Lets create a dialog with an "onLoad" event handler to give your dialog a variable to access it later. class test_Dialog { idd = 17001; // not used here but required // variable for which we will access the dialog onLoad = "uiNamespace setVariable ['test_dialog_variable', (_this select 0)];"; class Controls { class test_list: RscListBox // inherent data from defines { idc = 12345; // number to access that control x = 8.5 * GUI_GRID_W + GUI_GRID_X; // position data y = 5.6 * GUI_GRID_H + GUI_GRID_Y; w = 24 * GUI_GRID_W; h = 7 * GUI_GRID_H; }; }; }; Now, in a script lets access that control and add a list item. // the "onload" eventHandler created this variable when opening the dialog _dialog = uiNamespace getVariable "test_dialog_variable"; // get list control from IDC number _list = _dialog displayCtrl 12345; // add item & data to list _index = _list lbAdd "Test Text"; _list lbSetData [_index,"Test Data"]; now that the data is set, lets retrieve it in another script // get dialog and control again _dialog = uiNamespace getVariable "test_dialog_variable"; _list = _dialog displayCtrl 12345; // get index of currently selected item _index = lbCurSel _list; // get text & data _data = _list lbData _index; // returns "Test Data" _text = _list lbText _index; // returns "Test Text"
  17. Use lbAdd to add an item to a listbox and then use lbSetData to give it some string value (it really should have one unified command, but it doesnt). Have your button run a function or script with buttonSetAction. That function/script then uses lbCurSel to get the selected list index, and finally use lbData to retrieve the value you previously set - or lbText to get the text added with lbAdd. All of the dialog scripting commands can be found here.
  18. Naw, you are better of using the forEach method. My function method would only come in handy if you were using the code repeatedly throughout the game. It adds a definable spawn count, but thats really the only advantage. You could script that into the foreach method rather easily as well.
  19. nearly there... _v = createVehicle [_s, getMarkerPos _x, [], 100, "NONE"]; //// foreach ["20","21","22","23"];
  20. We can turn it into a function with some simple parameters like position and count. Put this in init.sqf [color="#FF8040"]zyg_fnc_spawnArmour [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_p"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_c"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_p[/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="#1874CD"]_c[/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]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]to[/b][/color] [color="#1874CD"]_c[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_r"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_s"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_v"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_r[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]100[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_s[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#000000"]true[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]81[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_rcws_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]61[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_CRV_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]41[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_AA_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]26[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_cannon_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]11[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_TUSK_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]6[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_arty_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_mlrs_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_s[/color][color="#8B3E2F"][b],[/b][/color] [color="#1874CD"]_p[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]100[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#191970"][b]setDir[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#191970"][b]setFuel[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#FF0000"]0.5[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]0.5[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]true[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter Usage: [array position, number count] spawn zyg_fnc_spawnArmour; [getMarkerPos "20",10] spawn zyg_fnc_spawnArmour; [getPos player,5] spawn zyg_fnc_spawnArmour; [[2345,6789,0],2] spawn zyg_fnc_spawnArmour; Note: Since this is being defined in the init.sqf, you have to wait until after mission start to call the function. It wont work flat out in a units init box. Use a small sleep before the function. This below would work in a units init. It will spawn 10 vehicles around the objects position, 2 seconds after mission start. this spawn {sleep 2; [getPos _this,10] spawn zyg_fnc_spawnArmour;};
  21. This is how I would write that script. See if you can get all 10 to spawn with it. [color="#FF8040"][color="#191970"][b]for[/b][/color] [color="#7A7A7A"]"_i"[/color] [color="#191970"][b]from[/b][/color] [color="#FF0000"]1[/color] [color="#191970"][b]to[/b][/color] [color="#FF0000"]10[/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_r"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_s"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_v"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_r[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]100[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_s[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]if[/b][/color] [color="#000000"]true[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]81[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_rcws_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]61[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_CRV_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]41[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_APC_Tracked_01_AA_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]26[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_cannon_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]11[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_TUSK_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]6[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_arty_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_r[/color] [color="#8B3E2F"][b]>[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]exitWith[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#7A7A7A"]"B_MBT_01_mlrs_F"[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_s[/color][color="#8B3E2F"][b],[/b][/color] [color="#191970"][b]getMarkerPos[/b][/color] [color="#7A7A7A"]"20"[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]100[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#191970"][b]setDir[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_v[/color] [color="#191970"][b]setFuel[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#FF0000"]0.5[/color] [color="#8B3E2F"][b]-[/b][/color] [color="#191970"][b]random[/b][/color] [color="#FF0000"]0.5[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [/color] Made with KK's SQF to BBCode Converter EDIT: Fixed the "if-do"... i make that same damn mistake all the time!
  22. Um, put the code I posted in the expression field, not the words "forced respawn"... thats just the option I was talking about that was causing your issue. youre silly dude lol To clarify, FORCED RESPAWN: ENABLED EXPRESSION: if (isServer) then { (_this select 0) spawn { clearMagazineCargoGlobal _this; clearWeaponCargoGlobal _this; clearItemCargoGlobal _this; clearBackpackCargoGlobal _this; _this addWeaponCargoGlobal ["tf47_m3maaws", 1]; }; }; Now, when the mission starts, the vehicle will automatically respawn, running the code above from the expression field. You can leave the vehicle INIT blank, because it wont apply.
  23. Well there lies your problem. The module is probably respawning the vehicle at the start of the mission... "Forced Respawn". Put this under the "expression" field in the modules window. This will run every time the vehicle respawns. if (isServer) then { (_this select 0) spawn { clearMagazineCargoGlobal _this; clearWeaponCargoGlobal _this; clearItemCargoGlobal _this; clearBackpackCargoGlobal _this; _this addWeaponCargoGlobal ["tf47_m3maaws", 1]; }; }; Confirmed to work with forced respawn.
  24. Are you using some kind of respawn script or module on the vehicle?
  25. Its been working for me. I use the alternate syntax however. _colors = _display displayCtrl 1111; _colors lbAdd _name; _colors lbSetColor [(lbSize _colors)-1, [1,0,0,0.5]];
×