Jump to content

Viba

Member
  • Content Count

    175
  • Joined

  • Last visited

  • Medals

Everything posted by Viba

  1. Corpses are registered as CIV units, just check the side of the player group. _correctSide = side (group player);
  2. You can find keynames from here: C:\Username\Documents\Arma 3\Username.Arma3Profile To disable the map key, add KeyDown EH and use this: _handled = false; if ((_this select 1) in actionKeys "ShowMap") then {_handled = true}; _handled;
  3. publicVariableClient requires the owner id of the player object so it knows who to send the data to, you can get it by doing: (owner playerobject). On your own client that would simply be (owner player). On the server you either have to find the desired player object by scripts or have the client send somekind of loadrequest that contains the clients player object, or you could use the mission.sqm defined name for the player slot the player is occupying. publicvariable broadcasts a variable and it's value across the network, a defined publicvariableeventhandler for that variable is triggered across all clients (and server), but not on the client/server that broadcasted it. So essentially publicvariable sends variable to everyone, publicvariableclient sends variable from server to a specific client, publicvariableserver sends variable from client to server only.
  4. Otherwise good, but that is NOT the dedicated servers FPS, hint is only working on the client and thus that is not running on the server.
  5. Whole thing is run. pubVars: if (isNil "mypubvar") then {//predefine mypubvar = "predefined"; };
  6. Just try copying my version directly.
  7. random 100 and check if the number is over 100? Logical error, you have to lower the number you are checking for.
  8. if (!isDedicated) then { while {true} do { waitUntil {sleep 5; (alive player) && (isNull (finddisplay 49))}; // || any other things needed to take into account, respawn dialog and so on? _number = random 100; if (_number > 85) then { player addWeapon "DMR"; //player addMagazine... and so on }; //If you loop at fullspeed you'd get DMR's all the time, just modify the random chance and the sleep time so it's balanced. sleep 60; }; };
  9. Sounds like the same thing I'm experiencing with a headless client -> http://forums.bistudio.com/showthread.php?182432-Headless-Client-troubles-since-1-63-amp-Steam
  10. #login adminpassword #monitor 5 The number after monitor is the interval in seconds it shows you server info. Diag_fps works also on server, you can send it to clients eg. with pubvars.
  11. _vehicle_23094 = objNull; if (true) then { _this = createVehicle ["Infostand_2_EP1", [4057.35, 11662.7, 0.000128174], [], 0, "CAN_COLLIDE"]; _vehicle_23094 = _this; _this setDir 207.046; _this setPos [4057.35, 11662.7, 0.000128174]; }; ----> _vehicle_23094 = createVehicle ["Infostand_2_EP1", [4057.35, 11662.7, 0.000128174], [], 0, "CAN_COLLIDE"]; _vehicle_23094 setDir 207.046; _vehicle_23094 setPos [4057.35, 11662.7, 0.000128174];
  12. Well the new 1.63 patch kinda f*cks up the headless client. If I start it through steam with startup parameters in steam it fails to join the correct slot and doesn't initialize properly somehow. If I start it from the new ArmA2OA_BE.exe file with the same startup parameters it works fine, until at some point it starts lagging the WHOLE server, making it even hard to connect to it through RDP, shutting down the HC normalizes the situation immediately. No problems whatsoever in the previous builds pre-1.63. The "forceHeadlessClient=1;" should work, but as I stated above...
  13. Hard to say without the code.
  14. You need unique copies. Before steam you could just block a port on the server and be done with it, not sure how it is now.
  15. Check this out for some basics about it: http://forums.bistudio.com/showthread.php?180345-Advanced-Uniform-Changing&p=2729183#post2729183
  16. A quick mockup so that players can send their grid location to another player, worked fine for me when I tested it on a dedicated server: You can put everything in the main init.sqf except for the last part. Might not contain full functionality of what you are after but should provide a basic starting point at least. //Server relays the message from one sourceclient to the targetclient if (isServer) then { "relayPosMsg" addpublicvariableeventhandler { _arr = _this select 1; _source = _arr select 0; _destination = _arr select 1; receivePosMsg = _source; (owner _destination) publicvariableclient "receivePosMsg"; }; }; if (!isDedicated) then { //Sends the messageinformation to the server that relays it further, also removes the addactions and starts the main addaction. sendMessage = { relayPosMsg = [player, (_this select 0)]; publicvariableserver "relayPosMsg"; {player removeaction _x;} forEach actions; [] spawn addLocAction; }; //Removes the main addaction and compiles an addaction list of all the players on the server so the player can choose who to send the message to. compilePlayerList = { actions = []; player removeAction action1; _action = player addAction ["Cancel", "actionHandler.sqf", "{player removeaction _x;} forEach actions; [] spawn addLocAction;",0,false,true,"","alive player"]; actions = actions + [_action]; { _text = format ["Send gridlocation to %1",name _x]; _args = format ['[%1] spawn sendMessage;',_x]; _action = player addaction [_text, "actionHandler.sqf", _args,0,false,true,"","alive player"]; actions = actions + [_action]; } forEach playableUnits; }; //When server relays the message to the client this processes and shows it. "receivePosMsg" addpublicvariableeventhandler { _name = name (_this select 1); _gridpos = mapGridPosition (_this select 1); _message = format ["Transmission from %1 at grid %2...",_name,_gridpos]; titleText [_message, "PLAIN"]; }; //Just simply adds the main addaction to the player addLocAction = { action1 = player addAction ["Send gridlocation to a player...", "actionHandler.sqf", "[] spawn compilePlayerList;",0,false,true,"","alive player"]; }; [] spawn addLocAction; }; //Put this in actionHandler.sqf in the main mission folder call compile format ["%1", _this select 3]; Feel free to modify to your needs.
  17. Need more information about what you are trying to accomplish? Do you want players to be able to send messages to each other containing their grid location?
  18. Depends how you launch the script. If it runs on the client you can just use player.
  19. https://community.bistudio.com/wiki/mapGridPosition
  20. Well, your condition returns always true. Randomly upon joining or just randomly when playing? if (!isDedicated) then { _number = random 100; if (_number > 85) then { player addWeapon "DMR"; player addMagazine... and so on }; };
  21. This should work, you can loop it to have moving markers: number = 0; for "_i" from 0 to number do {deletemarkerlocal format ["Vehicle_%1",_i];}; { _markername = format ["Vehicle_%1",number]; _pos = getPos _x; _vpos = [_pos select 0, _pos select 1]; _marker = createMarkerLocal [_markername, _vpos]; _class = typeOf _x; _marker setMarkerTextLocal _class; _marker setMarkerTypeLocal "Dot"; _marker setMarkerSizeLocal [0.45, 0.45]; _marker setMarkerColorLocal "ColorGreen"; _marker setMarkerAlphaLocal 0.75; number = number + 1; } forEach playableUnits;
  22. Use this too: https://community.bistudio.com/wiki/enableSimulation
  23. ASL height varies as the waves move. A bit like okurz suggested, you could just create a helipad at some coordinates on the map and attach the stuff to it. eg.: _helih = "HeliHEmpty" createVehicle [0, 0, 0]; //Either setpos the objects to desired locations and attach them immediately to the HeliHEmpty //Or fiddle around until you have the needed coordinates for the attachTo command _myvehicle setpos _desiredpos; _myvehicle attachTo [_helih]; //or _myvehicle attachTo [_helih, _myarrayofcoordinates];
  24. I was assuming that only the server has the server/extraction.sqf script and folder, not included in the mission file.
×