Jump to content
Fiddi

[SOLVED] Determine what texture a vehicle has?

Recommended Posts

Hey,
 
I was wondering if there's a functions or way to detect which texture from textureSources a vehicle uses currently.
 
I'm using the bis_fnc_initVehicle* to set the texture but I have to write one for each vehicle, would be easier and more neat to have a script that automates the process, for respawn and whatnot, and grabs the texture I've chosen in Eden instead of me manually selecting.
 
*

[this, 'Blufor'] call bis_fnc_initVehicle;

As per usual, any help would be appreciated, thanks!

Share this post


Link to post
Share on other sites

Yes, but that would be another manual to be put in each vehicles init. Anyway thanks for helping.

 

I've solved it myself by going through the functions viewer and found the function bis_fnc_getVehicleCustomization, which gives, among other, the vehicles current texture.

 

So with:

_paint = ([_vehicle] call bis_fnc_getVehicleCustomization select 0) select 0;

I get the vehicles current texture, in the right format (classname in string).

  • Like 3

Share this post


Link to post
Share on other sites

Especially when they take the time to write about it, instead of just leaving the topic open. :icon14: 

  • Like 3

Share this post


Link to post
Share on other sites

Aww, you guys!

Yeah, I have come across problems that some have solved but not explained how and I thought that i shouldn't be a part of that. Also since I'll probably forget how I did it in the future... Good to have it documented.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×