Jump to content
  • 0

locked vehicles not to take damage?


Shiz

Question

Can anyone help me with locked vehicles not to take damage. I don't want to put a dome around people's bases, I just want to protect peoples vehicles when they are not online to defend against the trolls that come on late at night. I have seen servers advertising this mod / script.

 

 

 

Thanks

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

BUMPidy bump BUMP 

I would like this too

 

 

 

something like this but done correctly

 

godlock.sqf

 

private ["_vehicle","_status"];
_vehicle = _this select 0;
_status = _this select 1;
 
if (local _vehicle) then {
if(_status) then {
_vehicle setVehicleLock "LOCKED";
_vehicle setVariable ["cargod",true,true];
} else {
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["cargod",false,true];
};
};
Link to comment
Share on other sites

  • 0

 

BUMPidy bump BUMP 

I would like this too

 

 

 

something like this but done correctly

 

godlock.sqf

 

private ["_vehicle","_status"];
_vehicle = _this select 0;
_status = _this select 1;
 
if (local _vehicle) then {
if(_status) then {
_vehicle setVehicleLock "LOCKED";
_vehicle setVariable ["cargod",true,true];
} else {
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["cargod",false,true];
};
};

 

 

It's similair to how players get godmode by turning off the damage eventhandlers. Something like this:

vehicle player removeAllEventHandlers "handleDamage";
vehicle player addEventHandler ["HandleDamage", {false}];
Link to comment
Share on other sites

  • 0

Can anyone help me with locked vehicles not to take damage. I don't want to put a dome around people's bases, I just want to protect peoples vehicles when they are not online to defend against the trolls that come on late at night. I have seen servers advertising this mod / script.

 

 

 

Thanks

did you evewr get locked vehicles to god mode ??

Link to comment
Share on other sites

  • 0

Couldn't you do this the same way that you do the anti towing of locked vehicles?  Should be able to override the  local_lockUnlock.sqf  and do something like...

 

...

if(_status) then {
        _vehicle setVehicleLock "LOCKED";
        _vehicle setVariable ["R3F_LOG_disabled",true,true];

_vehicle removeAllEventHandlers "handleDamage";

_vehicle addEventHandler ["handleDamage", {false}];

_vehicle allowDamage false;

} else {

...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...