Jump to content
  • 0

Wrong colors of clientside vehicles


SDraw

Question

Posted

After updating to 1.3.5 clientside vehicles have wrong colors after creating. Colors changes to random.

Steps:

1.Create clientside vehicle.

2.Change its colors (RGB).

Sample code:

local veh = createVehicle(...) 
setVehicleColor(veh,0,141,255,0,0,0) 

Besides, getVehicleColor returns right colors. Changing color after a while is right too.

xp4rdg.jpg

1.3.4 - right vehicle color

1.3.5 - wrong vehicle color

8 answers to this question

Recommended Posts

  • 0
Posted

Yes, there were two shaders: for hiding numberplate part and for replacing texture of it. But even without them problem still exists.

Sorry for posting there, because I've just found button to report issue on bugtracker (it didn't want to appear).

  • 0
Posted
I can't reproduce this problem. Can you make a resource to show it?
local px,py,pz = getElementPosition(localPlayer) 
local veh = createVehicle(411,px-5,py-5,pz) 
setVehicleColor(veh,0,141,255,0,0,0) 
  
function colorChFunc() 
    setVehicleColor(veh,0,141,255,0,0,0) 
end 
  
bindKey("j","down",colorChFunc) 

dct01c.jpg

  • 0
  • MTA Team
Posted

Thanks. Still can't reproduce the problem. Are you sure this is a 1.3.5 issue?

It looks like the vehicle RGB color is being changed into color ids like this:

setVehicleColor( veh, getVehicleColor(veh) )

Check your scripts to see if they are using setVehicleColor anywhere.

  • 0
Posted
Thanks. Still can't reproduce the problem. Are you sure this is a 1.3.5 issue?
Yes, I use latest build (1.3.5-rc-6159).
Check your scripts to see if they are using setVehicleColor anywhere.
Only in one script, exactly where it should be.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...