dazholmes 4 Posted October 16, 2013 (edited) /////////////////////////////////// // Simple Vehicle Repair & Flip Vehicle Script For Arma 3 // by TAW DAZ _timeForRepair = 5; _vehicle = vehicle player; hint format ["Please wait %1 seconds for repair/flip",_timeForRepair]; sleep _timeForRepair; if (_vehicle == player) then {_vehicle = cursorTarget;}; _vehicle setfuel 1; _vehicle setdamage 0; _vehicle = nil; _vehicle = _this select 0; _vehicle setvectorup [0,0,1]; Just save this in your mission folder repair.sqf now type this code into the init of your vehicle. this addAction [("<t color=""#66FFFF"">" + ("Repair/Flip") +"</t>"), "repair.sqf",[],1,false,true]; [http://i.imgur.com/bCEk8v5.jpg (269 kB) Edited February 11, 2015 by Dazholmes Share this post Link to post Share on other sites
novahot 1 Posted February 1, 2014 I searched the forums, tried five several scripts, even tinkered with the modules in editor which won`t work after vehicle respawn on dedicated server. I desperately need an repair/rearm/resupply script thats easy to handle. This one would be great, the only thing is, I need it to work but don't get it to work in a trigger area. Any help would be appreciated. Share this post Link to post Share on other sites
KC Grimes 79 Posted February 1, 2014 Congrats on the release! Good to see new folks interested in scripting for more than just themselves. At that, welcome to the community as well! I suggest you continue improving your skill with SQF and dish out some more scripts, perhaps even expanding on this one. One thing I've found is that the simple things are always in high demand. Share this post Link to post Share on other sites
dazholmes 4 Posted April 23, 2014 (edited) Thanks. Edited February 11, 2015 by Dazholmes Share this post Link to post Share on other sites
BEAKSBY 11 Posted July 11, 2014 Please help. _veh is displaying as any in the Repair.sqf (Result: Please wait 2 seconds to repair any). Thus the vehicle is not being repaired. I am adding the addAction in as part of one script: VehicleCreate.sqf // Get variables from vehicle selected _vehType = _this select 0; _tank = _vehType createVehicle [0,0,10]; _this addAction [("<t color=""#66FFFF"">" + ("Repair/Flip") +"</t>"), {[_vehType] execvm "Repair.sqf"},[],1,true,true]; then in the repair script I have Repair.sqf _veh = select 0; _timeForRepair = 2; _veh setFuel 1; _veh setDamage 0; _veh setVehicleAmmo 1; _veh setpos [getpos _veh select 0, getpos _veh select 1, 0.5]; hint format ["Please wait %1 seconds to repair %2",_timeForRepair, _veh]; Share this post Link to post Share on other sites
dazholmes 4 Posted February 11, 2015 Hey I've Updated the code Here /////////////////////////////////// // Simple Vehicle Repair & Flip Vehicle Script For Arma 3 // by TAW DAZ _timeForRepair = 5; _vehicle = vehicle player; hint format ["Please wait %1 seconds for repair/flip",_timeForRepair]; sleep _timeForRepair; if (_vehicle == player) then {_vehicle = cursorTarget;}; _vehicle setfuel 1; _vehicle setdamage 0; _vehicle = nil; _vehicle = _this select 0; _vehicle setvectorup [0,0,1]; Share this post Link to post Share on other sites
dzrealkiller 11 Posted November 12, 2015 Hi does this still work? And If it does, How could I make it so the player requires the "ToolKit" item to be able to repair? Share this post Link to post Share on other sites
R3vo 2654 Posted November 12, 2015 /////////////////////////////////// // Simple Vehicle Repair & Flip Vehicle Script For Arma 3 // by TAW DAZ if ("Toolkit" in (items player) then //check for toolkit { _timeForRepair = 5; _vehicle = vehicle player; hint format ["Please wait %1 seconds for repair/flip",_timeForRepair]; sleep _timeForRepair; if (_vehicle == player) then {_vehicle = cursorTarget;}; _vehicle setfuel 1; _vehicle setdamage 0; _vehicle = nil; _vehicle = _this select 0; _vehicle setvectorup [0,0,1]; } else { hint "Toolkit required!"; }; Share this post Link to post Share on other sites
dzrealkiller 11 Posted November 13, 2015 Anyway to modify this to instead of repairing vehicles with a toolkit you could heal players with MediKit so when a player has the MediKit they could look at an injured player and scroll heal but takes like 5 seconds for a full heal but cancelled when the medikit player moves from his position. Is that doable? Share this post Link to post Share on other sites