Jump to content

Car Painting Rainbow script.


Veho360

Recommended Posts

Posted

Hey you guys!

I'm looking for a script that is available on communities like FFS and TG in which the car color changes between several colors

I'd like to know how to make one or if someone can give me the script!

Best Regards

Veho360

Posted

To make it, you must use:

setTimer 
math.random 
setVehicleColor 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
To make it, you must use:
setTimer 
math.random 
setVehicleColor 

Wouldn't it make more sense to use onClientRender? It would be much smoother.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

You would still need timers...

How come? You can use addEventHandler and removeEventHandler to toggle it on and off. I don't see why a timer would be necessary at all, since it would do the math for the colour with every frame, instead of a minimum of 50ms(Which would make it look sluggish/erratic).

Whether it's more efficient, I don't know. Probably doesn't matter since it would be client side.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted
I think he wants the colors of the rainbow, like FFS has, not math.random. Thats why he would need timers.

You still really don't need timers to set that up :P Biggest problem with onClientRender is that it might be too fast, and too slow - depending on what FPS the server is limited to.

I could try to do it later. Point is, both ways will work in one way or another.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

The only problem with onClientRender is that it can't be used server side, so he'll need to set the vehicle colour clientside and other players won't see it. Not sure if it's intended that other players see it or not though.

Anyhow, timers would work just fine for server side, and onClientRender would be ideal for clientside :)

If he wants a smooth transition between colours (like on FFS) then math.random is useless. InterpolateBetween would work

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

350x20_FFFFFF_FFFFFF_000000_000000.png

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