OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: 70gunner on 21 May 2007, 23:45:56
-
Currently looking for the an authorisation script for the use of any vehicle.
Only pilots can fly
crewmembers can only use driver/gunner/commanderseat in armor
Can somebody point me inthe right direction.
Thanks in advance
-
Try running this script in the init field of each vehicle you want to proctect.
// Only pilots.sqf
// Only pilots piloting
_vehicle = _this select 0;
_pilotstypes = ["SoldierWPilot", "BISCamelPilot", "SoldierEPilot", "BISCamelPilot2"];
_driver = objNull;
while {damage _vehicle < 0.5} do
{
_driver = driver _vehicle;
if (!isNull _driver) then
{
if (!((typeOf _driver) in _pilotstypes)) then
{
_driver action ["GETOUT", _vehicle];
};
};
Sleep 1;
};
-
Thx working like it should :good: