Veho360 Posted October 15, 2013 Share Posted October 15, 2013 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 Link to comment
mint3d Posted October 15, 2013 Share Posted October 15, 2013 Try this https://community.multitheftauto.com/ind ... ls&id=7462 Link to comment
Castillo Posted October 15, 2013 Share Posted October 15, 2013 To make it, you must use: setTimer math.random setVehicleColor Link to comment
Veho360 Posted October 15, 2013 Author Share Posted October 15, 2013 Try this https://community.multitheftauto.com/ind ... ls&id=7462 To make it, you must use: setTimer math.random setVehicleColor Thank you both I'm making it!!!! [Close the topic pls] Link to comment
Dealman Posted October 16, 2013 Share Posted October 16, 2013 To make it, you must use: setTimer math.random setVehicleColor Wouldn't it make more sense to use onClientRender? It would be much smoother. Link to comment
pa3ck Posted October 16, 2013 Share Posted October 16, 2013 To make it, you must use: setTimer math.random setVehicleColor Wouldn't it make more sense to use onClientRender? It would be much smoother. You would still need timers... Link to comment
Dealman Posted October 16, 2013 Share Posted October 16, 2013 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. Link to comment
pa3ck Posted October 16, 2013 Share Posted October 16, 2013 I think he wants the colors of the rainbow, like FFS has, not math.random. Thats why he would need timers. Link to comment
Dealman Posted October 16, 2013 Share Posted October 16, 2013 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 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. Link to comment
Driggero Posted October 16, 2013 Share Posted October 16, 2013 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now