No Damage to Locked to Air Vehicles

So, as the post stated.. I really would like a way to have no damage taken to locked air vehicles, because
they are more difficult to protect within a base than most land vehicles. Air vehicles, like helicopters, have to lift off and therefor they are usually exposed from the top if surrounded by walls, left outside of the base, or put on top of the base. I'm sure there are ways of building your base to meet the needs of this problem, but I'd like an easier way for players on my server to protect their prized vehicles.
 
Same thing like you make locked vehicles not tow/liftable, just something like this:
Code:
If (vehicle isKindof "Air") then {
This allowdamage false;
};

Hard to script from the phone ;P
 
Same thing like you make locked vehicles not tow/liftable, just something like this:
Code:
If (vehicle isKindof "Air") then {
This allowdamage false;
};

Hard to script from the phone ;P

And where would I add that?
Also, is that all I would need?
 
make a custom
dayz_code\compile\local_lockunlock.sqf:

Code:
if (local _vehicle) then {
    if(_status) then {
        _vehicle setVehicleLock "LOCKED";
if (_vehicle isKindof "Air") then {
_vehicle allowDamage false;
};
    } else {
        _vehicle setVehicleLock "UNLOCKED";
_vehicle allowDamage true;
    };
};

in dayz_server.pbo\compile\server_publishVehicle2.sqf
find this:
Code:
if(!_donotusekey) then {
        // Lock vehicle
        _object setvehiclelock "locked";
    };

and edit a bit to this:
Code:
if(!_donotusekey) then {
        // Lock vehicle
        _object setvehiclelock "locked";
if (_object isKindof "Air") then {
_object allowDamage false;
};
    };

dayz_server.pbo\system\server_monitor.sqf
Code:
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
    _object setvehiclelock "locked";
};

to this:
Code:
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
    _object setvehiclelock "locked";
if (_object isKindof "Air") then {
_object allowDamage false;
};
};

Problem with this is that all air vehicles become indesctructable when locked, this can be abused by some players.
Maybe a simple check if a plot pole is nearby and then make a locked air vehicle invincible this way you only make base parked aircrafts invincible ;)
 
make a custom
dayz_code\compile\local_lockunlock.sqf:

Code:
if (local _vehicle) then {
    if(_status) then {
        _vehicle setVehicleLock "LOCKED";
if (_vehicle isKindof "Air") then {
_vehicle allowDamage false;
};
    } else {
        _vehicle setVehicleLock "UNLOCKED";
_vehicle allowDamage true;
    };
};

in dayz_server.pbo\compile\server_publishVehicle2.sqf
find this:
Code:
if(!_donotusekey) then {
        // Lock vehicle
        _object setvehiclelock "locked";
    };

and edit a bit to this:
Code:
if(!_donotusekey) then {
        // Lock vehicle
        _object setvehiclelock "locked";
if (_object isKindof "Air") then {
_object allowDamage false;
};
    };

dayz_server.pbo\system\server_monitor.sqf
Code:
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
    _object setvehiclelock "locked";
};

to this:
Code:
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
    _object setvehiclelock "locked";
if (_object isKindof "Air") then {
_object allowDamage false;
};
};

Problem with this is that all air vehicles become indesctructable when locked, this can be abused by some players.
Maybe a simple check if a plot pole is nearby and then make a locked air vehicle invincible this way you only make base parked aircrafts invincible ;)


Just told my girlfriend the news. She's gone forever, can you come over so I can thank you?..

Testing it now!
 
Not working huh? Then post it

51a84248b6c5ca56b49bd24d4f2cb886

db75da19ba84fa7af758758aba0ad9ad

281b86b4a2eda93624e8ebd009846945
 
have you tested the vehicle after a restart?
Because you dont use a custom local_lockUnlock.sqf
from your file order it has to be this

compiles.sqf:
Code:
    local_lockUnlock =            compile preprocessFileLineNumbers "compile\local_lockUnlock.sqf";
 
have you tested the vehicle after a restart?
Because you dont use a custom local_lockUnlock.sqf
from your file order it has to be this

compiles.sqf:
Code:
    local_lockUnlock =            compile preprocessFileLineNumbers "compile\local_lockUnlock.sqf";

Yep, I restarted then tried it.
What do you mean I don't use it? I'm a bit confused since I already added a local_lockUnlock.sqf to my compiles folder in my mission.pbo.
 
Back
Top