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

  On 1/27/2015 at 4:19 AM, herculys said:

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...
  On 3/17/2015 at 9:28 PM, Barthy said:

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

  On 3/17/2015 at 9:28 PM, Barthy said:

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

 

  Reveal hidden contents

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

  Reveal hidden contents

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)

  Reveal hidden contents

 

player_paint.sqf

 

 

vehicle_colour.hpp

  Reveal hidden contents

 

 

vehicleColourPaint.sqf

  Reveal hidden contents

 

The Part in server_function.sqf:

  Reveal hidden contents

 

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

  Reveal hidden contents

 

 

the part in server_monitor.sqf:

  Reveal hidden contents

 

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

  On 5/7/2015 at 11:09 AM, SchwEde said:

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...