Only allowing a specific unit in a specific vehicle as driver or pilot - Printable Version +- Comrades in Arms Discussion Board (http://forum.ciahome.net) +-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3) +--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8) +--- Thread: Only allowing a specific unit in a specific vehicle as driver or pilot (/showthread.php?tid=3226) |
Only allowing a specific unit in a specific vehicle as driver or pilot - treendy - 12-29-2015 My second question... I want to be able to say something like "Player named bob can drive vehicle named car1" not allowing anyone else to drive the vehicle... only bob. Its basically a way to only allow pilots to fly.. but its a bit more in depth than that, and being able to specify which units are allowed to drive/fly which vehicles would fit perfectly Im looking up possible ways... but if anyone here knows of a nice way to do this, that would be great Thanks again Re: Only allowing a specific unit in a specific vehicle as driver or pilot - Alwarren - 12-29-2015 I used this in Bloodlines to prevent all non-Pilots to steer the Little Birds: Code: { units p13, p14 and p15 are the pilots, mh1, mh2 and mh3 are the MH-9's. Re: Only allowing a specific unit in a specific vehicle as driver or pilot - treendy - 12-29-2015 perfect thanks : ) Re: Only allowing a specific unit in a specific vehicle as driver or pilot - treendy - 12-30-2015 ok... getting a little confused here... the script above works however copilot can still get in and control the aircraft. I have tweaked the code to check for turretUnit and even tried just checking position is "gunner" I have however, discovered that if you try to enter as a gunner or co pilot, we are getting inside the if statement and it hints that you are not qualified, however it doesnt kick you out the vehicle Thought maybe because you need to unassign the role of gunner or something... but nothing seems to work. Any ideas? my adjusted code is below (will tidy it up once i get it working) just seems that doGetOut doesn't work for gunners or co pilot? Code: { Re: Only allowing a specific unit in a specific vehicle as driver or pilot - treendy - 12-30-2015 Hold fire : ) found a way around this... see below: used Code: _unit action ["getOut", _vehicle]; Code: { |