Diabolical1001 10 Posted November 17, 2013 as the title has stated is there a way ( in a multiplayer setting) to restrict the gunner/commander seats in vehicles unless there is a driver present? been looking around and cant seem to find anything on it thanks Share this post Link to post Share on other sites
iceman77 18 Posted November 17, 2013 (edited) It seems like a great idea at first. I was thinking of writing a script to do this. However, it could go wrong. What happens if the vehicle is out in the field and something happens to the driver? A disconnect, or a death (somehow). That would automatically render the vehicle useless. Anyhow... here's one way, though it only checks initially when the crew would get in. Something like this maybe (untested): this addEventHandler ["GetIn", {call TAG_fnc_crewCheck}]; init.sqf TAG_fnc_crewCheck = { _veh = _this select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "ready to roll"; } else { _unit action ["Eject", _veh]; hint "there's no driver"; }; }; Edited November 17, 2013 by Iceman77 Share this post Link to post Share on other sites
Diabolical1001 10 Posted November 18, 2013 It seems like a great idea at first. I was thinking of writing a script to do this. However, it could go wrong. What happens if the vehicle is out in the field and something happens to the driver? A disconnect, or a death (somehow). That would automatically render the vehicle useless. Anyhow... here's one way, though it only checks initially when the crew would get in.Something like this maybe (untested): this addEventHandler ["GetIn", {call TAG_fnc_crewCheck}]; init.sqf TAG_fnc_crewCheck = { _veh = _this select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "ready to roll"; } else { _unit action ["Eject", _veh]; hint "there's no driver"; }; }; thanks iceman, and the whole (What happens if the vehicle is out in the field and something happens to the driver) ill use the tough luck excuse ---------- Post added at 04:59 ---------- Previous post was at 04:48 ---------- It seems like a great idea at first. I was thinking of writing a script to do this. However, it could go wrong. What happens if the vehicle is out in the field and something happens to the driver? A disconnect, or a death (somehow). That would automatically render the vehicle useless. Anyhow... here's one way, though it only checks initially when the crew would get in.Something like this maybe (untested): this addEventHandler ["GetIn", {call TAG_fnc_crewCheck}]; init.sqf TAG_fnc_crewCheck = { _veh = _this select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "ready to roll"; } else { _unit action ["Eject", _veh]; hint "there's no driver"; }; }; thanks iceman, and the whole (What happens if the vehicle is out in the field and something happens to the driver) ill use the tough luck excuse ---------- Post added at 05:02 ---------- Previous post was at 04:59 ---------- well, not quite working, this is what was in the rpt file though Error in expression <s select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "read> Error position: <count driver _veh > 0) then { hint "read> Error count: Type Object, expected Array,Config entry File C:\Users\radio rentals\Documents\Arma 3 - Other Profiles\Diabolical\mpmissions\crewkick%20test.Stratis\init.sqf, line 4 Error in expression <s select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "read> Error position: <count driver _veh > 0) then { hint "read> Error count: Type Object, expected Array,Config entry File C:\Users\radio rentals\Documents\Arma 3 - Other Profiles\Diabolical\mpmissions\crewkick%20test.Stratis\init.sqf, line 4 Error in expression <s select 0; _unit = _this select 2; if (count driver _veh > 0) then { hint "read> Error position: <count driver _veh > 0) then { hint "read> Error count: Type Object, expected Array,Config entry File C:\Users\radio rentals\Documents\Arma 3 - Other Profiles\Diabolical\mpmissions\crewkick%20test.Stratis\init.sqf, line 4 Share this post Link to post Share on other sites
iceman77 18 Posted November 18, 2013 TAG_fnc_crewCheck = { _veh = _this select 0; _unit = _this select 2; if (!isNull driver _veh) then { hint "ready to roll"; } else { _unit action ["Eject", _veh]; hint "there's no driver"; }; }; Share this post Link to post Share on other sites
Diabolical1001 10 Posted November 18, 2013 cheers working good besides the fact that if your in the the drivers seat and scroll to the gunners seat it doesn't kick you out, not sure on a fix for that Share this post Link to post Share on other sites
iceman77 18 Posted November 18, 2013 You'd have to monitor the seats in a loop and kick any occupants out if a driver isn't present. Unless someone knows a better way. Share this post Link to post Share on other sites
Diabolical1001 10 Posted November 19, 2013 this has got me stuck, if i could fin a way in were if your in the drivers seat it would disable the option to move to commander and gunner it would be fine Share this post Link to post Share on other sites
MulleDK19 21 Posted November 22, 2013 Use assignAsDriver, then use lock on the vehicle with parameter as 3. That'll prevent the player from entering anything but the driver seat. Share this post Link to post Share on other sites
Diabolical1001 10 Posted November 24, 2013 Use assignAsDriver, then use lock on the vehicle with parameter as 3. That'll prevent the player from entering anything but the driver seat. thanks ill give that a go Share this post Link to post Share on other sites