Jump to content
  • 0

Paint vehicles?


NorthyPark

Question

Recommended Posts

  • 0

This is how my version looks like, since we're all sharing anyway

 

the setobjecttexture is the right way and has to be done server side in order to show for everyone.

 

CUvu7Tl.jpg

 

Where are all the Belgians at ^^. Nice to see talented Belgians!

 

Does your system persist over restarts? ^^

Link to comment
Share on other sites

  • 0

Haha! I am also always surprised there are more belgiums than I'd suspect!

 

Yes, It's made server side, the colours are added into an array on the database and each restart they get repainted!

It took modifying several files but it works smooth!

 

yesh, ^^ sounds good. Same here.

 

 

Hey Ruben can I buy your code so you don't release it?

 

Am I doing it right? :D

 

 

Awww :( dont blame me. i release enough other stuff! Like Doormanagement  this weekend ( prob thursday already). NO MORE KEY CODES, Fully managed with a list ( adding people) to LOCK/Unlock doors . 

Link to comment
Share on other sites

  • 0

Zupa loving some of the code you write, been playing around with your single currency system, a few changes here and there. REALLY looking forward to your door management system, if you decide to post that.

Link to comment
Share on other sites

  • 0

Zupa loving some of the code you write, been playing around with your single currency system, a few changes here and there. REALLY looking forward to your door management system, if you decide to post that.

He will release Doormanagement for everyone, so do not worry.

Link to comment
Share on other sites

  • 0

That's actually pretty sad he paid to not have it released xD

Well Zupa wasn't originally going to do it.

No use crying over it.... If Zupa wants to release he can, its not up to us to really decided on what he should do(He is a person after all).

Over half of the server owners here wouldn't want anyone else to have it, if it was for their server only. it's such a unique thing to have.

Why don't you think ruubje11 or Maca wont release it either?

Link to comment
Share on other sites

  • 0
private ["_colour", "_playerWealth", "_cost"];
_cost = 5000;
 
_playerWealth = player getVariable["ccgwealth",0];
 
if (_cost > _playerWealth) exitWith {
titleText ["You do not have enough money...","PLAIN DOWN"]; titleFadeOut 4;
};
 
_colour = [((sliderPosition 4700) / 10), ((sliderPosition 4701) / 10), (sliderPosition 4702) / 10];
PVDZE_setVehicleColour = [VehicleToPaint, _colour, player];
publicVariableServer "PVDZE_setVehicleColour";
 
titleText ["Vehicle has been refueled!","PLAIN DOWN"]; titleFadeOut 4;
player setVariable["ccgwealth",(_playerWealth - _cost),true];
PVDZE_plr_Save = [player,(magazines player),true,true];
publicVariableServer "PVDZE_plr_Save";
Link to comment
Share on other sites

  • 0

Well Zupa wasn't originally going to do it.

No use crying over it.... If Zupa wants to release he can, its not up to us to really decided on what he should do(He is a person after all).

Over half of the server owners here wouldn't want anyone else to have it, if it was for their server only. it's such a unique thing to have.

Why don't you think ruubje11 or Maca wont release it either?

Where did I say I cared if it was released or I was crying about it? Simply stating it's sad he paid to not have it released.

Link to comment
Share on other sites

  • 0

Where did I say I cared if it was released or I was crying about it? Simply stating it's sad he paid to not have it released.

vehicleColourPaint.SQF :

 

private ["_colour", "_playerWealth", "_cost"];
_cost = 5000;
 
_playerWealth = player getVariable["ccgwealth",0];
 
if (_cost > _playerWealth) exitWith {
titleText ["You do not have enough money...","PLAIN DOWN"]; titleFadeOut 4;
};
 
_colour = [((sliderPosition 4700) / 10), ((sliderPosition 4701) / 10), (sliderPosition 4702) / 10];
PVDZE_setVehicleColour = [VehicleToPaint, _colour, player];
publicVariableServer "PVDZE_setVehicleColour";
 
titleText ["Vehicle has been refueled!","PLAIN DOWN"]; titleFadeOut 4;
player setVariable["ccgwealth",(_playerWealth - _cost),true];
PVDZE_plr_Save = [player,(magazines player),true,true];
publicVariableServer "PVDZE_plr_Save";
=================================================================
vehiclecolour_dialog.hpp :
 
class VehicleColourDialog
{
idd = 420005;
movingenable = 0;
onLoad = "uiNamespace setVariable ['VehicleColourDialog', _this select 0]";
 
class Controls {
class RscText_1000: RscTextT
{
idc = -1;
x = 0.323683 * safezoneW + safezoneX;
y = 0.265134 * safezoneH + safezoneY;
w = 0.352634 * safezoneW;
h = 0.469731 * safezoneH;
colorBackground[] = {0,0,0,0.7};
};
class RscText_1001: RscTextT
{
idc = -1;
text = "Vehicle Colour"; //--- ToDo: Localize;
x = 0.323683 * safezoneW + safezoneX;
y = 0.265134 * safezoneH + safezoneY;
w = 0.352634 * safezoneW;
h = 0.0469731 * safezoneH;
colorBackground[] = {0,0,0,0.7};
};
class RscText_1002: RscTextT
{
idc = -1;
text = "Red"; //--- ToDo: Localize;
x = 0.345723 * safezoneW + safezoneX;
y = 0.334944 * safezoneH + safezoneY;
w = 0.0618689 * safezoneW;
h = 0.0220074 * safezoneH;
};
class RscSlider_1900
{
idc = 4700;
x = 0.406332 * safezoneW + safezoneX;
y = 0.334944 * safezoneH + safezoneY;
w = 0.247946 * safezoneW;
h = 0.0220074 * safezoneH;
type = CT_SLIDER;
style = SL_HORZ;
color[] = { 1, 1, 1, 0.5 }; 
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "call VehicleColourUpdate;";
};
class RscText_1003: RscTextT
{
idc = -1;
text = "Green"; //--- ToDo: Localize;
x = 0.345723 * safezoneW + safezoneX;
y = 0.378959 * safezoneH + safezoneY;
w = 0.0618689 * safezoneW;
h = 0.0220074 * safezoneH;
};
class RscSlider_1901
{
idc = 4701;
x = 0.406332 * safezoneW + safezoneX;
y = 0.378959 * safezoneH + safezoneY;
w = 0.247946 * safezoneW;
h = 0.0220074 * safezoneH;
type = CT_SLIDER;
style = SL_HORZ;
color[] = { 1, 1, 1, 0.5 }; 
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "call VehicleColourUpdate;";
};
class RscText_1004: RscTextT
{
idc = -1;
text = "Blue"; //--- ToDo: Localize;
x = 0.345723 * safezoneW + safezoneX;
y = 0.422974 * safezoneH + safezoneY;
w = 0.0618689 * safezoneW;
h = 0.0220074 * safezoneH;
};
class RscSlider_1902
{
idc = 4702;
x = 0.406332 * safezoneW + safezoneX;
y = 0.422974 * safezoneH + safezoneY;
w = 0.247946 * safezoneW;
h = 0.0220074 * safezoneH;
type = CT_SLIDER;
style = SL_HORZ;
color[] = { 1, 1, 1, 0.5 }; 
coloractive[] = { 1, 1, 1, 1 };
onSliderPosChanged = "call VehicleColourUpdate;";
};
class RscStructuredText_1100: RscStructuredText
{
idc = 4703;
text = "";
x = 0.406332 * safezoneW + safezoneX;
y = 0.477993 * safezoneH + safezoneY;
w = 0.247946 * safezoneW;
h = 0.198067 * safezoneH;
colorBackground[] = {0,0,0,0};
};
class RscText_1005: RscTextT
{
idc = -1;
text = "Colour"; //--- ToDo: Localize;
x = 0.345723 * safezoneW + safezoneX;
y = 0.477993 * safezoneH + safezoneY;
w = 0.0618689 * safezoneW;
h = 0.0330111 * safezoneH;
};
class RscText_1006: RscTextT
{
idc = 4704;
x = 0.345723 * safezoneW + safezoneX;
y = 0.511004 * safezoneH + safezoneY;
w = 0.0618689 * safezoneW;
h = 0.0990333 * safezoneH;
colorBackground[] = {0,0,0,1};
};
class RscShortcutButton_1700: RscShortcutButton
{
idc = -1;
text = "Close";
x = 0.345723 * safezoneW + safezoneX;
y = 0.664406 * safezoneH + safezoneY;
w = 0.0683244 * safezoneW;
h = 0.0521408 * safezoneH;
onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 9000);";
};
class RscShortcutButton_1701: RscShortcutButton
{
idc = -1;
text = "Paint";
x = 0.588158 * safezoneW + safezoneX;
y = 0.664406 * safezoneH + safezoneY;
w = 0.0683244 * safezoneW;
h = 0.0521408 * safezoneH;
onButtonClick = "call VehicleColourPaint; ((ctrlParent (_this select 0)) closeDisplay 9000);";
};
};
};
 
===================================================================================
 
compile :
 
VehicleColourPaint = compile preprocessFileLineNumbers "maca134\compile\vehicleColourPaint.sqf";
=======================================================================================
 
init :
 
CCGColourVehicles = [
"ATV_CZ_EP1", 1,
"ATV_US_EP1", 1,
"Mi17_Civilian_DZ", 1,
"UH60M_EP1_DZE", 3,
"HMMWV_M998A2_SOV_DES_EP1_DZE", 2,
"HMMWV_M1151_M2_CZ_DES_EP1_DZE", 3, //?
"UAZ_MG_TK_EP1_DZE", 1,
"Ural_CDF", 1,
"Ural_TK_CIV_EP1", 1,
"Ural_UN_EP1", 1,
"V3S_Open_TK_CIV_EP1", 1,
"Kamaz", 1,
"MTVR_DES_EP1", 1,
"MH6J_DZ", 1,
"AH6X_DZ", 1,
"HMMWV_M1035_DES_EP1", 3,
"HMMWV_Ambulance", 1,
"HMMWV_Ambulance_CZ_DES_EP1", 1,
"HMMWV_DES_EP1", 1,
"HMMWV_DZ", 1,
"hilux1_civil_3_open_EP1", 1,
"hilux1_civil_1_open", 1,
"datsun1_civil_1_open", 1,
"Pickup_PK_GUE_DZE", 1,
"Pickup_PK_INS_DZE", 1,
"Pickup_PK_TK_GUE_EP1_DZE", 1,
"Offroad_DSHKM_Gue_DZE", 1,
"LAV25_HQ_DZE", 3,
"BTR90_HQ_DZE", 3,
"M1133_MEV_EP1", 1,
"pook_H13_gunship", 1,
"pook_H13_transport", 1,
"VWGolf", 1,
"pook_H13_civ_slate", 1,
"pook_H13_medevac", 1
];
Link to comment
Share on other sites

  • 0

Isn't this just the CCG paint vehicle code?

 

Yes that seems to be Maca's Code wiothout any credit given.  And that code only dont get you far, u will also neeed code server sided if you want persistent colors.

 

And i llove he didnt post any actual colorring haha xD

 

only a dialog. and a get data from the dailog

Link to comment
Share on other sites

  • 0

That's quite stupid and lame to be honest. Anyone who wanted to find out more about the painting can find it immediatly in their mission file. To just post it here without any credits is just .. useless..

Especially with the fact that without server code you're nowhere.. That's where the beautiful magic happens :D

Link to comment
Share on other sites

  • 0

Oooh I've done a bit of digging, I have a general idea of how to set that up, pre made skins I'll mess around with when my test server gets back online, damn vilayer needing to authenticate dlls. The colour support is something I plan to mess with, not entirely sure how to make it save over restarts though, without using unused vehicle classes.

Link to comment
Share on other sites

  • 0

Oooh I've done a bit of digging, I have a general idea of how to set that up, pre made skins I'll mess around with when my test server gets back online, damn vilayer needing to authenticate dlls. The colour support is something I plan to mess with, not entirely sure how to make it save over restarts though, without using unused vehicle classes.

I will tell you that your biggest issue isn't the saving part.

You have to remember that setObjectTexture is a local command only and doesn't update for the server.

center your idea around that and wonder how to make it update for all the clients...

Link to comment
Share on other sites

  • 0

i have managed to get the spray cans and stencils into game for overpoch origins/ overpochins at the moment they dont have a use which is why i am interested in this painting script so then for the first part they have a use in game like they do in origins but only to recolour vechiles using the stencils

 

@ Zupa since your the pro at this sort of thing compared to me is there any chance you could give me some pointers via pm i dont wish to use someone elses code that doesnt want it used but once this is tested and working on my server i will put up a guide on how to do it

Link to comment
Share on other sites

  • 0

Theres already a thread on retexturing vehicles, but making the system allow for any colour to be selected and save across restarts will be more difficult. That is if I ever get around to starting this.

Link to comment
Share on other sites

  • 0

It's just simply the exact same procedure like the retexture command here:

 

You just need to replace your texture path with the RGB command.

 

instead of this

_object setVehicleInit 'this setObjectTexture [0, ''custom\SUV.jpg''];';
processInitCommands;

you use this

_object setVehicleInit 'this setObjectTexture [0, ''#(argb,8,8,3)color(0,1,0,1)''];';
processInitCommands;

done.

 

https://community.bistudio.com/wiki/setObjectTexture

 

Just read the second Note by Lou Montana at the bottom of the page. Also there are more information to change the colour you want to set.

Link to comment
Share on other sites

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