Jump to content

[Release] Paint Vehicles


0verHeaT

Recommended Posts

So, to bind the action to the item I would change the fn_selfAction.sqf part to:

Is this correct?

					_karena = items player;

				if ("IRStrobe" in _karena) then {
					hasBagItem = true;
				} else { hasBagItem = false;};
					if ((_typeOfCursorTarget in ColourVehicles)&& hasBagItem && _canDo) then {
		private ["_paint"];
		_paint = player addAction ["Paint", "Paint\player_paint_init.sqf",_cursorTarget, 2, true, true, "", ""];
		s_player_lockunlock set [count s_player_lockunlock,_paint];
	};
Link to comment
Share on other sites

someone can give me a hand, i have done all right too no rpt errors, and is not working for me (waiting forever for updating texture and never does.)

 

 2:11:11 "VEHICLE PAINT: Player Herculys (11111111111111111) has painted a SUV Blue!"

 

i tried to pain a blue suv with green and red colours, and nothing happens.

Link to comment
Share on other sites

someone can give me a hand, i have done all right too no rpt errors, and is not working for me (waiting forever for updating texture and never does.)

 

 2:11:11 "VEHICLE PAINT: Player Herculys (11111111111111111) has painted a SUV Blue!"

 

i tried to pain a blue suv with green and red colours, and nothing happens.

 

Im not sure if it is possible to retexture a SUV Blue.

Try to test it with a 'Mi17_Civilian_DZ'!

Link to comment
Share on other sites

  • 3 weeks later...

After installing P4L I tried this again and it just.. worked. Didn't do anything different this time but now I can actually paint the vehicles :D 

The color disappears after restarts though. Checked server_monitor (thats the file responsible for such things right?) but I believe everything is alright there. Any hints?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Guess it doesnt work with other scripts cause we just lost our world.. scrapped the database.....  Should be mentionned to only load this on vanilla servers.... well.. we learned...

 

I have a heavily scripted server and I installed this with no drama at all. My server_updateObject.sqf had an issue, but only because I have precise base building installed as well. I just edited the required precise stuff into the paint vehicles edit and away it went. Colours stay persistent through restarts and everything. 

 

I just wish when you painted a car orange, that the tyres stayed black instead of also being orange :)

Link to comment
Share on other sites

Guess it doesnt work with other scripts cause we just lost our world.. scrapped the database.....  Should be mentionned to only load this on vanilla servers.... well.. we learned...

 

You must have fucked something up yourself. I don't see how you would delete a whole database lol. 

Link to comment
Share on other sites

  • 1 month later...

Obviously a mess up on my end but any help would be appreciated

 

Error in expression <lock,_lock];

if (_typeOfCursorTarget in ColourVehicles) then {
private ["_paint">
  Error position: <ColourVehicles) then {
private ["_paint">
  Error Undefined variable in expression: colourvehicles

File mpmissions\__CUR_MP.chernarus\ZSC\compiles\fn_selfActions.sqf, line 304

 

the block from my fn_selfActions.sqf

if(_player_lockUnlock_crtl) then {

if (s_player_lockUnlock_crtl < 0) then {
_hasKey = _ownerID in _temp_keys;
_oldOwner = (_ownerID == dayz_playerUID);
if(locked _cursorTarget) then {
if(_hasKey || _oldOwner) then {
_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
} else {
if(_hasHotwireKit) then {
_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true, "", ""];
} else {
_Unlock = player addAction [format["<t color=#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED], "",_cursorTarget, 2, true, true, "", ""];
};
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
};
} else {
if(_hasKey || _oldOwner) then {
_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_lock];
if (_typeOfCursorTarget in ColourVehicles) then {
private ["_paint"];
_paint = player addAction ["Paint", "Paint\player_paint_init.sqf",_cursorTarget, 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_paint];
};
s_player_lockUnlock_crtl = 1;
};
};
};

 

Link to comment
Share on other sites

you forgot to paste this at the end of your variables.sqf


ColourVehicles = [
	"ATV_CZ_EP1",
	"ATV_US_EP1",
	"SUV_TK_CIV_EP1",
	"Mi17_Civilian_DZ",
	"UH60M_EP1_DZE",
	"Ka52",
	"Ka52Black",
	"UH1H_TK_EP1",
	"UH60M_MEV_EP1",
	"HMMWV_M998A2_SOV_DES_EP1_DZE",
	"HMMWV_M1151_M2_CZ_DES_EP1_DZE",
	"UAZ_MG_TK_EP1_DZE",
	"Ural_CDF",
	"Ural_TK_CIV_EP1",
	"Ural_UN_EP1",
	"V3S_Open_TK_CIV_EP1",
	"Kamaz",
	"MTVR_DES_EP1", 
	"MH6J_DZ",
	"AH6X_DZ",
	"HMMWV_M1035_DES_EP1",
	"HMMWV_Ambulance",
	"HMMWV_Ambulance_CZ_DES_EP1",
	"HMMWV_DES_EP1",
	"HMMWV_DZ",
	"hilux1_civil_3_open_EP1",
	"hilux1_civil_1_open",
	"datsun1_civil_1_open",
	"Pickup_PK_GUE_DZE",
	"Pickup_PK_INS_DZE",
	"Pickup_PK_TK_GUE_EP1_DZE",
	"Offroad_DSHKM_Gue_DZE",
	"LAV25_HQ",
	"BTR90_HQ_DZE",
	"M1133_MEV_EP1",
	"pook_H13_amphib",
	"pook_H13_civ",
	"pook_H13_medevac_CIV",
	"pook_H13_transport",
	"pook_H13_gunship_PMC",
	"pook_H13_transport_INS",
	"VWGolf"
	];
Link to comment
Share on other sites

For a more dynamic Vehicle Painting with Part Selection

 

(Most of this is just copy + pasted)

 

player_paint.sqf

private ["_txt","_coins","_vehicle","_cursorTarget","_j","_max","_typeOfCursorTarget","_missions1","_missions2","_missions3",
"_missionSelection","_selected","_missionVar","_missionSelectionArray","_playerName","_missionName"];
VehicleToPaint = _this select 3;
ColourPrice = 7500;

hiddenSelectionSel = (getArray (configFile >> "CfgVehicles" >> (typeOf VehicleToPaint) >> "hiddenSelections"));

//systemchat (format["Martins Debug: HiddenSelections are -> %1",hiddenSelectionSel]);


_missionSelectionArray = [];

_cursorTarget = cursorTarget;
_typeOfCursorTarget = typeOf _cursorTarget;


missionNameSelect = "";
exitscript = true;
snext = false;

fnc_add_actions = {

	paintMenu =
	{
		private ["_missionMenu","_missionArray"];
		_missionMenu = [["",true], ["You can Paint these Parts:", [-1], "", -5, [["expression", ""]], "1", "0"]];
		for "_i" from (_this select 0) to (_this select 1) do
		{
			_missionArray = [format['%1', hiddenSelectionSel select (_i)], [_i - (_this select 0) + 2], "", -5, [["expression", format ["missionNameSelect = hiddenSelectionSel select %1;", _i]]], "1", "1"];
			_missionMenu set [_i + 2, _missionArray];
		};
		_missionMenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];
		if (count hiddenSelectionSel > (_this select 1)) then
		{
			_missionMenu set [(_this select 1) + 3, ["Next", [12], "", -5, [["expression", "snext = true;"]], "1", "1"]];
		} else {
			_missionMenu set [(_this select 1) + 3, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];
		};
		_missionMenu set [(_this select 1) + 4, ["Exit", [13], "", -5, [["expression", "missionNameSelect = 'exitscript';"]], "1", "1"]];
		showCommandingMenu "#USER:_missionMenu";
	};
	
	/* Wait for the player to select a Key from the list */
	_j = 0;
	_max = 10;
	if (_max > 9) then {_max = 10;};
	while {missionNameSelect == ""} do {
		[_j, (_j + _max) min (count hiddenSelectionSel)] call paintMenu;
		_j = _j + _max;
		waitUntil {missionNameSelect != "" || snext};
		snext = false;
	};
	
	if (missionNameSelect != "exitscript") then {
		 if ((alive player) && {isNil {dayz_playerName}}) then {
			dayz_playerName = name player;
		};
		
		if (missionNameSelect == "Camo") then {
			_coins = 'EPOCHMODS\ZSC\gui\Money.paa'; //<- Change the path here to your Coin display image!
			_vehicle = getText(configFile >> "cfgVehicles" >> (typeOf VehicleToPaint) >> "displayName");
			createdialog "VehicleColourDialog";
			_txt = format ["<t>It will cost %1 <img image='%2'/><br/>to repaint your %3.</t>",ColourPrice,_coins,_vehicle];
			((uiNamespace getVariable "VehicleColourDialog") displayCtrl 5703) ctrlSetStructuredText parseText _txt;
			HiddenSelection = 0;
		};
		if (missionNameSelect == "Camo1") then {
			_coins = 'EPOCHMODS\ZSC\gui\Money.paa'; //<- Change the path here to your Coin display image!
			_vehicle = getText(configFile >> "cfgVehicles" >> (typeOf VehicleToPaint) >> "displayName");
			createdialog "VehicleColourDialog";
			_txt = format ["<t>It will cost %1 <img image='%2'/><br/>to repaint your %3.</t>",ColourPrice,_coins,_vehicle];
			((uiNamespace getVariable "VehicleColourDialog") displayCtrl 5703) ctrlSetStructuredText parseText _txt;
			if (hiddenSelectionSel select 0 == "camo") then {
				HiddenSelection = 1;
			} else {
				HiddenSelection = 0;
			};
		};
		if (missionNameSelect == "Camo2") then {
			_coins = 'EPOCHMODS\ZSC\gui\Money.paa'; //<- Change the path here to your Coin display image!
			_vehicle = getText(configFile >> "cfgVehicles" >> (typeOf VehicleToPaint) >> "displayName");
			createdialog "VehicleColourDialog";
			_txt = format ["<t>It will cost %1 <img image='%2'/><br/>to repaint your %3.</t>",ColourPrice,_coins,_vehicle];
			((uiNamespace getVariable "VehicleColourDialog") displayCtrl 5703) ctrlSetStructuredText parseText _txt;
			if (hiddenSelectionSel select 0 == "camo") then {
				HiddenSelection = 2;
			} else {
				HiddenSelection = 1;
			};
		};
		if (missionNameSelect == "Camo3") then {
			_coins = 'EPOCHMODS\ZSC\gui\Money.paa'; //<- Change the path here to your Coin display image!
			_vehicle = getText(configFile >> "cfgVehicles" >> (typeOf VehicleToPaint) >> "displayName");
			createdialog "VehicleColourDialog";
			_txt = format ["<t>It will cost %1 <img image='%2'/><br/>to repaint your %3.</t>",ColourPrice,_coins,_vehicle];
			((uiNamespace getVariable "VehicleColourDialog") displayCtrl 5703) ctrlSetStructuredText parseText _txt;
			if (hiddenSelectionSel select 0 == "camo") then {
				HiddenSelection = 3;
			} else {
				HiddenSelection = 2;
			};
		};
		if (missionNameSelect == "Camo4") then {
			_coins = 'EPOCHMODS\ZSC\gui\Money.paa'; //<- Change the path here to your Coin display image!
			_vehicle = getText(configFile >> "cfgVehicles" >> (typeOf VehicleToPaint) >> "displayName");
			createdialog "VehicleColourDialog";
			_txt = format ["<t>It will cost %1 <img image='%2'/><br/>to repaint your %3.</t>",ColourPrice,_coins,_vehicle];
			((uiNamespace getVariable "VehicleColourDialog") displayCtrl 5703) ctrlSetStructuredText parseText _txt;
			if (hiddenSelectionSel select 0 == "camo") then {
				HiddenSelection = 4;
			} else {
				HiddenSelection = 3;
			};
		};
	};
};

if (count hiddenSelectionSel > 0) then {
	//Has Variable
	[] spawn fnc_add_actions;
	
} else {
	systemchat "Sorry, this Vehicle can not be painted...";
};

 

 

vehicle_colour.hpp

class VehicleColourDialog
{
	idd = 571113;
	movingenable = 0;
	onLoad = "uiNamespace setVariable ['VehicleColourDialog', _this select 0]";
	
	class Controls {
	
	class RscText_100:RscTxtT
	{
		idc=-1;
		colorBackground[]= {0,0,0,0.7};
		x = safezoneX + 0.3133333333333333 * safezoneW;
		y = safezoneY + 0.298148148148148 * safezoneH;
		w = 0.366666666666667 * safezoneW;
		h = 0.414814814814815 * safezoneH;
	};
	
	class RscText_101:RscTxtT
	{
		idc=-1;
		text= "Vehicle Colour";
		colorBackground[]= {0,0,0,0.7};
		x = safezoneX + 0.3133333333333333 * safezoneW;//+0.22
		y = safezoneY + 0.298148148148148 * safezoneH;//+0.15
		w = 0.366666666666667 * safezoneW;
		h = 0.0296296296296296 * safezoneH;
	};
	
	class RscStructuredText_110:RscStrText
	{
		idc = 5703;
		text = "";
		x = 0.386666666666667 * safezoneW + safezoneX;
		y = 0.624074074074074 * safezoneH + safezoneY;
		w = 0.2 * safezoneW;
		h = 0.0592592592592593 * safezoneH;
		colorBackground[]= {0,0,0,0};
	};

	class RscShortcutButton_171:RscScButton
	{
		idc=-1;
		text= "Paint";
		x = 0.32 * safezoneW + safezoneX;
		y = 0.653703703703704 * safezoneH + safezoneY;
		w = 0.075 * safezoneW;
		h = 0.065 * safezoneH;
		onButtonClick = "call VehicleColourPaint; ((ctrlParent (_this select 0)) closeDisplay 9000);";
	};

	class RscShortcutButton_170:RscScButton
	{
		idc = -1;
		text = "Close";
		x = 0.603333333333333 * safezoneW + safezoneX;
		y = 0.653703703703704 * safezoneH + safezoneY;
		w = 0.075 * safezoneW;
		h = 0.065 * safezoneH;
		onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 9000);";
	};
	/**
	class RscText_122:RscTxtT
	{
		idc=-1;
		text= "Blue";
		x=0.32 * safezoneW + safezoneX;
		y=0.564814814814815 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};

	class RscText_121:RscTxtT
	{
		idc=-1;
		text= "Green";
		x=0.32 * safezoneW + safezoneX;
		y=0.535185185185185 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};

	class RscText_120:RscTxtT
	{
		idc=-1;
		text= "Red";
		x=0.32 * safezoneW + safezoneX;
		y=0.505555555555556 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};

	class RscSlider_292
	{
		idc=6702;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.564814814814815 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate2;";
	};

	class RscSlider_291
	{
		idc=6701;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.535185185185185 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate2;";
	};

	class RscSlider_290
	{
		idc=6700;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.505555555555556 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate2;";
	};

	class RscText_117:RscTxtT
	{
		idc=-1;
		text= "Colour 2";
		x=0.603333333333333 * safezoneW + safezoneX;
		y=0.475925925925926 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};
	**/
	class RscText_115:RscTxtT
	{
		idc=-1;
		text= "Colour 1";
		x=0.603333333333333 * safezoneW + safezoneX;
		y=0.327777777777778 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};

	class RscText_110:RscTxtT
	{
		idc=5704;
		colorBackground[]={0,0,0,1};
		x=0.603333333333333 * safezoneW + safezoneX;
		y=0.355555555555556 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0888888888888889 * safezoneH;
	};

	class RscText_106:RscTxtT
	{
		idc= 6704;
		colorBackground[]= {0,0,0,1};
		x=0.603333333333333 * safezoneW + safezoneX;
		y=0.505555555555556 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0888888888888889 * safezoneH;
	};
	
	class RscSlider_192
	{
		idc=5702;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.416666666666667 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate;";
	};

	class RscSlider_191
	{
		idc=5701;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.387037037037037 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate;";
	};

	class RscSlider_190
	{
		idc=5700;
		x=0.386666666666667 * safezoneW + safezoneX;
		y=0.357407407407407 * safezoneH + safezoneY;
		w=0.2 * safezoneW;
		h=0.0296296296296296 * safezoneH;
		type = CT_SLIDER;
		style = SL_HORZ;
		color[] = { 1, 1, 1, 0.5 }; 
		coloractive[] = { 1, 1, 1, 1 };
		onSliderPosChanged = "call VehicleColourUpdate;";
	};

	class RscText_104:RscTxtT
	{
		idc=-1;
		text= "Blue";
		x=0.32 * safezoneW + safezoneX;
		y=0.416666666666667 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};

	class RscText_109:RscTxtT
	{
		idc=-1;
		text= "Green";
		x=0.32 * safezoneW + safezoneX;
		y=0.387037037037037 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};
	
	class RscText_102:RscTxtT
	{
		idc=-1;
		text= "Red";
		x=0.32 * safezoneW + safezoneX;
		y=0.357407407407407 * safezoneH + safezoneY;
		w=0.05 * safezoneW;
		h=0.0296296296296296 * safezoneH;
	};
	};
};

 

 

vehicleColourPaint.sqf

private ["_colour","_colour2","_playerWealth","_PUID"];
_PUID = (getPlayerUID player);

_playerWealth = [player,ColourPrice] call SC_fnc_removeCoins;

if (_playerWealth) then {
	_colour = ""+str((sliderPosition 5700) / 10)+","+str((sliderPosition 5701) / 10)+","+str((sliderPosition 5702) / 10)+",1";
	//_colour2 = ""+str((sliderPosition 6700) / 10)+","+str((sliderPosition 6701) / 10)+","+str((sliderPosition 6702) / 10)+",1";

	PVDZE_veh_Colour = [VehicleToPaint,HiddenSelection,_colour,_PUID,dayz_playerName];
	publicVariableServer "PVDZE_veh_Colour";

	titleText ["Vehicle has been repainted! Please wait a moment for the texture to update!","PLAIN DOWN"];
} else {
	titleText ["You do not have enough money to repaint your vehicle!","PLAIN DOWN"];
};

 

The Part in server_function.sqf:

private["_position","_worldspace","_fuel","_key","_colour","_selection","_object","_objectID","_PUID","_clrFormatArr","_clrAppend","_clrinit","_clrinit2","_pname","_name"];
_object = _this select 0;
_selection = _this select 1;
_colour = _this select 2;
		
_clrinit = format ["#(argb,8,8,3)color(%1)",_colour];

_object setVehicleInit "this setObjectTexture ["+str _selection+","+str _clrinit+"];";

processInitCommands;

_clrFormatArr = [_selection,_colour];
		
_clrAppend = _object getVariable["Colour",[]];

_clrAppend set [count _clrAppend,_clrFormatArr];
_object setVariable["Colour",_clrAppend,true];

		
_name = getText(configFile >> "cfgVehicles" >> (typeOf _object) >> "displayName");
_PUID = ((_this select 1) select 3);
_pname = ((_this select 1) select 4);
		
diag_log format ["[VEHICLE PAINT]: Paint Array: %1 (Selection: %2 || Colour: %3)",_clrAppend,_selection,_colour];
diag_log format ["[VEHICLE PAINT]: Player %1 (%2) has painted a %3!",_pname,_PUID,_name];
		
_position = getPosATL _object;
		
_worldspace = [
	round(direction _object),
	_position,
	_clrAppend
];
		
_fuel = 0;
_fuel = fuel _object;
		
_objectID =	_object getVariable ["ObjectID","0"];
		
_key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
_key call server_hiveWrite;

 

dayz_server.pbo\compiles\server_updateObject.sqf (_object_position)

_object_position = {
	private["_position","_worldspace","_fuel","_key","_colourArray","_owner","_vectorUp","_vectorDir"];
	_position = getPosATL _object;
	
	_colourArray = _object getVariable["Colour",[]];
	_owner = _object getVariable["pOwnerPUID",0];
	
	_worldspace = [
		round(direction _object),
		_position,
		_colourArray,
		_owner
	];
	
	_fuel = 0;
	if (_object isKindOf "AllVehicles") then {
		_fuel = fuel _object;
	};
	
	_key = format["CHILD:305:%1:%2:%3:", _objectID, _worldspace, _fuel];
	//diag_log ("HIVE: WRITE: "+ str(_key));
	_key call server_hiveWrite;
	
};

 

 

the part in server_monitor.sqf:

if(count _worldspace >= 2) then{	
		if (((typeName(_worldspace select 2)) == "ARRAY")) then {
			_colour = _worldspace select 2;
			
			_object setVariable["Colour",_colour,true];
			
			{
				try {
					if (typeName _x != "ARRAY") then {
						throw "Not Array";
					} else {
						_clrSel = _x select 0;
						_clrUnformatted = _x select 1;
						_clrinit = format ["#(argb,8,8,3)color(%1)",_clrUnformatted];
						_object setVehicleInit "this setObjectTexture ["+str _clrSel+","+str _clrinit+"];";
					}
				}

				catch {
					if (_exception == "Not Array") then {
						diag_log(format["[VEHICLE PAINT] ERROR: TypeName of Given Colour is %1 Expected ARRAY",(typeName _x)]);
					}
				};
			} forEach _colour;
		};
	};

 

Link to comment
Share on other sites

Hello,

 

I ve installed this script but the paint menu doesnt show up.

 

I use Zupa's coins script () and I dont have a variables.sqf in my mission folder.

So I ve put the vehicles list in the variables.sqf of my dayz_code.

 

There are no errors in my RPT file.

Link to comment
Share on other sites

well then you messed up now your dayz_code.

You need to pull the variables.sqf from the dayz_code to you mission.

 

Alot of Tutorials how to do this, just use some google ;)

thank you for the advise, the paint option is in the scroll menu now.

The script runs fine.

Link to comment
Share on other sites

At this point sorry but installing scripts before knowing what is what and just blind copy paste and mostly only half of the code gets copied.. I musr say it is no wonder the owner is not giving support anymore, nobody cares about to solve problems because 90% of problems here are just people who didn't read properly.

Link to comment
Share on other sites

  • 3 weeks later...

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
×
×
  • Create New...