Jump to content

How to set car color only for me?


Hiding

Recommended Posts

Posted

Hi. Not too sure you've made much an effort here with this one but here goes.

So if you take a look at setVehicleColor on the Wiki there's a few examples; https://wiki.multitheftauto.com/wiki/SetVehicleColor

These are server-sided examples and thus would sync to other players if used, however if you remove the player variable from the function arguments of the command handler and change the player element variable to localPlayer, you would be able to achieve this.
By setting it on your client side the change would only be displayed to you.

Hope this clears this up and feel free to reply if you need any further help. :) 
- TM

  • Like 1
Posted
local myCar = getPedOccupiedVehicle(localPlayer)
setVehicleColor(myCar, 0, 0, 255, 0, 0, 255)

This will change the color of your car to red, but other players will still see your car as its original color. This is because the color change is only applied to your client and is not synced with the server or other clients

  • Like 1

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