sethduda / AdvancedTowing

Advanced Towing (Arma 3)
http://steamcommunity.com/sharedfiles/filedetails/?id=639837898
33 stars 27 forks source link

Don't allow players to tow locked vehicles #1

Closed sethduda closed 8 years ago

ka0sCODE commented 8 years ago

Check config.cpp

class Lock: ExileAbstractAction
            {
                title = "Lock";
                condition = "((locked ExileClientInteractionObject) isEqualTo 0) && ((locked ExileClientInteractionObject) != 1)";
                action = "true spawn ExileClient_object_lock_toggle";
            };

            // Unlocks a vehicle
            class Unlock: ExileAbstractAction
            {
                title = "Unlock";
                condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
                action = "false spawn ExileClient_object_lock_toggle";
            };

As well as ExileClient_object_vehicle_network_lockResponse.sqf / ExileClient_object_lock_toggle.sqf, / ExileClient_object_vehicle_network_lockVehicleRequest.sqf.

Easy identifier:

if (_mode) then
{ 
_vehicleObject lock 2;
}
else 
{
_vehicleObject lock 0;
};

Should be fairly easy to add checks for this.

sethduda commented 8 years ago

Thanks - added to the latest source

sethduda commented 8 years ago

Released on steam in v1.2.1