Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

TheDusty01

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Everything posted by TheDusty01

  1. You you're right with that. Obviously you should filter out variables which you don't need but in practice it works but I can't recommend it either, just a way to do it.
  2. Hey, you could setup your CfgFunctions etc. on a server side mod (like in Altis Life with life_server stuff) and add all your client variables there and broadcast them over to the client which is connecting by using publicVariableClient. I know it works since it got used on a server. Since I don't have the codes right now I can only give you my idea right now. When client has the initialization part done, he calls a server-side script which broadcasts all the function variables over: private _unit = param [0, objNull, [objNull]]; { (owner _unit) publicVariableClient _x; } forEach (allVariables missionNameSpace); Hope I was able to help, Regards, Dusty
  3. Hey, if you want "ghost" objects which are basically invisible and have no hitbox, do this: private _veh = "C_Offroad_01_F" createVehicle (position player); // Spawns offroad at players position _veh hideObject true; // Hides to object on the client where this command got executed If you want it MP compatible, do this: private _veh = "C_Offroad_01_F" createVehicle (position player); // Spawns offroad at players position /* Hides the given object (the offroad here) on every client and for those who are still joining or are going to join (=JIP). Works even though our JIP parameter for remoteExecCall is false since 'hideObjectGlobal' has built in JIP Executed by the server (via remoteExec) by request from the client */ [_veh, true] remoteExecCall ["hideObjectGlobal", 2, false]; If you are already on the server, just do: /* Call the script with your already existing vehicle as parameter. Example: [VehicleNameFromEditor] sapwn "hideObject.sqf"; */ if (!isServer) exitWith {}; private _veh = params [0, objNull, [objNull]]; // Hides the given object (the offroad here) on every client and for those who are still joining or are going to join (=JIP) _veh hideObjectGlobal true; Hope I was able to help. Regards, Dusty
  4. I know very late answer but maybe useful for future readers. Code: _pth = "pathToFile.sqf"; // Works with images (.paa) aswell if ((loadFile _pth) isEqualTo "") exitWith {}; // File does not exist Hope I was able to help someone :)
  5. Hello there, as the title already says I got a problem with my capture script (with no Syntax-Errors). fn_moneyPointBlu.sqf: alt: http://pastebin.com/BcvMmrcw The problem with this is that the color isn't changing back to "ColorBlack" when nobody is in the sector. fn_moneyGive.sqf: alt: http://pastebin.com/1dHjZE50 How I execute the first script (fn_moneyPointBlu.sqf): /* File: core\functions\fn_mainLoop.sqf Author: TheDusty01 Description: Main loop for all capturable points. */ _game_active = varHolder getVariable "game_active"; while {_game_active} do { sleep 4; // Setting up the money system [] call game_fnc_moneyPointBlu; [] call game_fnc_moneyPointOpf; [] call game_fnc_moneyPointInd; // Setting up the capture points [] call game_fnc_capPoints; }; If someone has any ideas post them down below please. Thanks for help in advance, TheDusty01
  6. TheDusty01

    Capture script

    Gonna try it later since I don't have time now. Nvm, I just tried it and it didn't worked.. Stays black so it doesn't count as a tie even when I am inside the sector as a blufor soldier (which should execute the blufor part and the marker should be blue). Thanks for your help though! :)
  7. TheDusty01

    Capture script

    Oh I see, it should be if ((_blu + _opf + _ind) == 0) then { // bla bla }; Edit: Oh I am so stupid.. That wouldn't be really a tie but still this isn't the problem. When I am inside of the the area in still says over and over tie even when I am in it. But why?
  8. Thank you very much again! :) You helped me a lot!!
  9. Could you help me again? I want to force the unit "man1" to getout of the vehicle man1 leaveVehicle off1; doesn't work, here is my code: defenseBonus = { man1 setDamage 0; veh1 attachto [man1,[0,2,1.1]]; Sleep 10; veh1 attachto [placeholder,[0,0,10]]; Sleep 15; man1 addAction ["<t color='#FF0000'>Defense bonus", { (_this select 0) removeAction (_this select 2); [] spawn defenseBonus; }, nil, 10]; }; offenseBonus = { man1 setDamage 0; off1 attachto [man1,[0,0,4]]; detach off1; man1 moveInDriver off1; Sleep 10; man1 leavevehicle off1; man1 setDamage 0; off1 attachto [placeholder2,[0,0,10]]; man1 setDamage 0; Sleep 15; man1 addAction ["<t color='#FF0000'>Offense bonus", { (_this select 0) removeAction (_this select 2); [] spawn OffenseBonus; }, nil, 10]; }; sleep 15; man1 addAction ["<t color='#FF0000'>Defense bonus", { (_this select 0) removeAction (_this select 2); [] spawn defenseBonus; }, nil, 10]; sleep 15; man1 addAction ["<t color='#FF0000'>Offense bonus", { (_this select 0) removeAction (_this select 2); [] spawn offenseBonus; }, nil, 10];
  10. Yea! It is perfect, thanks! :) I had to edit it a little to work. If anyone wants to use it place a vehicle called "placeholder", a car/tank called "veh1" and the unit called "man1". He get's after a certain time surviving a defense bonus. Code: defenseBonus = { veh1 attachto [man1,[0,2,1.1]]; Sleep 16; veh1 attachto [placeholder,[0,0,10]]; Sleep 60; man1 addAction ["<t color='#FF0000'>Defense bonus", { (_this select 0) removeAction (_this select 2); [] spawn defenseBonus; }, nil, 10]; }; sleep 60; man1 addAction ["<t color='#FF0000'>Defense bonus", { (_this select 0) removeAction (_this select 2); [] spawn defenseBonus; }, nil, 10];
  11. Can somebody help me with this? I made a car called veh1 and a soldier called man1. while {true} do { sleep 5; _action = man1 addAction ["<t color='#FF0000'>Defense bonus</t>", "man1 removeAction _action; detach veh1; veh1 attachto [men1,[0,2,1.1]];", "", "10"]; sleep 10; if (_action == 1) then { detach veh1; veh1 attachto [placeholder,[0,0,10]]; } }; I want to execute the if code if the action got executed from the soldier. Please help me with this. Thanks, TheDusty01
×