socs 92 Posted January 13, 2019 Quote here you go (from our arma2 missions) //in mission.sqm class Sensors { items=3; class Item0 { position[]={4619.7158,0.19623651,-1617.5906}; timeoutMin=1; timeoutMid=1; timeoutMax=1; interruptable=1; age="UNKNOWN"; text="pinit"; name="pinit"; expCond="local player"; expActiv="plays = [] execVM ""scripts\pinit.sqf"";"; class Effects { }; }; class Item1 { position[]={9645.6133,13,2998.0623}; a=400; b=180; angle=90; rectangular=1; activationBy="ANY"; age="UNKNOWN"; text="airport"; name="AirportIn"; class Effects { }; }; class Item2 { position[]={8441.6699,678.59814,10571.127}; a=40; b=40; angle=50; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="farp1"; class Effects { }; }; }; }; make a folder in your mission folder called "scripts" and place these into it //scripts\pinit.sqf _cthread = [] execVM "scripts\MainThreadC.sqf"; //and any other player clientside scripts you care to run at player join //scripts\mainthreadC.sqf EGG_EVO_Repair = { _vec = (vehicle player); _type = typeOf vehicle player; if(getDammage _vec > 0 or fuel _vec < 0.98 and not (_vec isKindOf "Man")) then { _inrepairzone = ((_vec in list AirportIn) or (_vec in list farp1) );//your sensor zones in the mission named "Airportin" or "farp1" etc if(((_vec in list AirportIn) or (_vec in list farp1) ) and _vec != player and speed _vec > -2 and speed _vec < 2 and position _vec select 2 < 2.0 and (local _vec)) then { titleText [localize "STR_M04t83", "PLAIN DOWN",0.3]; for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do { sleep 0.200; if (getDammage _vec > 0) then {_vec setDammage ((getDammage _vec)-0.0125);}; if (Fuel _vec < 1) then {_vec setFuel ((Fuel _vec)+0.0125);}; if (getDammage _vec == 0 and Fuel _vec == 1) then {_loop2=1;}; if(_vec != vehicle player or speed _vec < -2 or speed _vec > 2 or position _vec select 2 > 2.0) then {_loop2=1;titleText [localize "STR_M04t84", "PLAIN DOWN",0.3];}; _dam = (getDammage _vec)*100; _ful = (Fuel _vec)*100; hint format["Damage: %1\nFuel: %2",Round _dam,Round _ful]; }; _vec setVehicleAmmo 1; }; }; }; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { [] call EGG_EVO_Repair; sleep 1.01; }; So I found this script on a couple of threads that used to be used on a server that is no longer around. The example mission is no longer around either, and the thread is quite old. But i did some digging and noticed it was still working in 2016, and that was 3 years after the original author had posted it. So I'm curious, can anyone tell me how to get this to actually work? I've made the scripts folder, made the pinit.sqf, and mainthreadC.sqf. I also added the classnames to my mission.sqm, which i just used notepad++ for... And it doesn't seem to be working, I cant find a trigger named "farp1" or "airportIn" nor when i attempt to create the triggers myself does it even work or do anything... Any and all help would be much appreciated, thank you. Link to the original thread: https://forums.bohemia.net/forums/topic/139701-vehicle-rearm-refuel-and-repair-script/?tab=comments#comment-2266477 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted January 13, 2019 Hello there socs ! check here : 1 Share this post Link to post Share on other sites
socs 92 Posted January 14, 2019 33 minutes ago, GEORGE FLOROS GR said: Hello there socs ! check here : Thanks a bunch! This was super helpful! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted January 19, 2019 On 14/1/2019 at 2:19 AM, socs said: Thanks a bunch! This was super helpful! Thank you very much socs ! Share this post Link to post Share on other sites