From 9c2326030aacdd4b0f352439cddce82be69a3ecb Mon Sep 17 00:00:00 2001 From: "DESKTOP-UH65DCE\\MusTanG" Date: Wed, 19 Apr 2017 21:40:26 -0500 Subject: [PATCH] Move Veh Action to Exile and New textures --- README.md | 16 +++++++++++++++- addons/paintshop/paintshop.sqf | 23 +++++------------------ addons/paintshop/settings.sqf | 6 ++++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index cdc7e15..c6fff32 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ All skins provided in this pack are the property of DonkeyPunch Community Gaming #### OUTPUT = 1,2-STRING,3-STRING,4-STRING,5,6,7,8,9,10,11,12,13,14,15-STRING,16,17,18,19 ####. -## STEP 6: +## STEP 6a: #### --add class Paint to your CfgInteractionMenus under class Construction >> Actions #### class Construction #### { @@ -86,6 +86,20 @@ All skins provided in this pack are the property of DonkeyPunch Community Gaming #### }; ####. +## STEP 6b: +#### --add class Paint to your CfgInteractionMenus +#### class Car and class Air and class Boat +#### +#### class Actions +#### +#### class Paint : ExileAbstractAction +#### { +#### title = "Paint Vehicle"; +#### condition = "((locked ExileClientInteractionObject) isEqualTo 0) && ((locked ExileClientInteractionObject) != 1) && (ExileClientNearPaintShop)"; +#### action = "ExileClientInteractionObject call HALV_paintshop_opendialog"; +#### }; +####. + ## Step 7: #### --add this to your CfgExileCustomCode #### class CfgExileCustomCode diff --git a/addons/paintshop/paintshop.sqf b/addons/paintshop/paintshop.sqf index ac5a5f6..88697d6 100644 --- a/addons/paintshop/paintshop.sqf +++ b/addons/paintshop/paintshop.sqf @@ -308,6 +308,7 @@ while{alive player}do{ player sideChat "-- Paint Shop --"; _sendmessage = false; }; + ExileClientNearPaintShop = true; if(player isEqualTo vehicle player)then{ if !(Backpack player in ["","B_Parachute","B_O_Parachute_02_F","B_I_Parachute_02_F","B_B_Parachute_02_F"])then{ if(_HALV_panitshop_bagaction< 0)then{ @@ -324,34 +325,20 @@ while{alive player}do{ }else{ player removeAction _HALV_panitshop_uniformaction; _HALV_panitshop_uniformaction = -1; - }; - _nearvehicles = (player nearEntities [["Air","LandVehicle","Ship"],40])-[player]; - if !(_nearvehicles isEqualTo _lastsearch)then{{player removeAction _x}forEach _HALV_panitshop_vehicleactions;_HALV_panitshop_vehicleactions = [];}; - if(count _HALV_panitshop_vehicleactions < 1)then{ - { - if !(_x isKindOf "Wreck_Base")then{ - _txt = (gettext (configFile >> 'cfgvehicles' >> (typeOf _x) >> 'displayName')); - _action = player addAction [format[" Paint %1",_txt], {(_this select 3) call HALV_paintshop_opendialog;}, _x,1, false, true, "", ""]; - _HALV_panitshop_vehicleactions pushBack _action; - }; - }forEach _nearvehicles; - }; - _lastsearch = _nearvehicles; - + }; }else{ - {player removeAction _x}forEach _HALV_panitshop_vehicleactions+[_HALV_panitshop_bagaction,_HALV_panitshop_uniformaction]; - _HALV_panitshop_vehicleactions = []; + {player removeAction _x}forEach [_HALV_panitshop_bagaction,_HALV_panitshop_uniformaction]; _HALV_panitshop_uniformaction = -1; _HALV_panitshop_bagaction = -1; _lastsearch = []; }; }else{ _sendmessage = true; - {player removeAction _x}forEach _HALV_panitshop_vehicleactions+[_HALV_panitshop_bagaction,_HALV_panitshop_uniformaction]; - _HALV_panitshop_vehicleactions = []; + {player removeAction _x}forEach [_HALV_panitshop_bagaction,_HALV_panitshop_uniformaction]; _HALV_panitshop_uniformaction = -1; _HALV_panitshop_bagaction = -1; _lastsearch = []; + ExileClientNearPaintShop = false; }; sleep 2; }; diff --git a/addons/paintshop/settings.sqf b/addons/paintshop/settings.sqf index 94313a3..c38b257 100644 --- a/addons/paintshop/settings.sqf +++ b/addons/paintshop/settings.sqf @@ -11,8 +11,10 @@ */ -//these are the classnames of buildings that will activate the paintshop -_paintshopbuildings = ["Land_CarService_F","Land_Repair_center","Exile_Construction_Flag_Static"]; +//these are the classnames of buildings that will activate the paintshop for uniforms / back packs / vehicles +//Base Painting is based on your own territory and the action is built into exile code +//Vehicle Painting is based on _paintshopBuildings and the action is built into exile code +_paintshopbuildings = ["Land_CarService_F","Land_Repair_center"]; //add textures and preset colors here _textures = [