Jump to content
  • 0

Setting a timer to a indestructible vehicle script


ftshill

Question

On my server I am trying to add a script which makes all locked vehicles indestructible after a certain time period. This is to prevent the continuous grifing..

This is what I have so far:

if (isNil "fnc_vehicle_handleDamage") then {

fnc_vehicle_handleDamage = vehicle_handleDamage;

};

vehicle_handleDamage = {

private["_unit","_result"];

_unit = _this select 0;

if (locked _unit) exitWith {_unit allowDamage false;};

_unit allowDamage true;

_result = _this call fnc_vehicle_handleDamage;

_result

};

Can anyone help me to add a timer to this so it only activates after 15mins of being locked and untouched..

Thanks in advance!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...