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
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
Hello admins, I have been blocked for some time, but forever. I just noticed that some people get blocked daily because of the cheat I used, I also want to be blocked daily, I am ready to be blocked twice. so i can play again
serial : DF99D1047A713904711538E6E1056AF2
LuaRocks is the package manager for Lua modules.
Small tricks allow you to use it on MTA server.
Installing
Linux x64:
Windows x86:
Usage example:
Installing packages is done by typing commands such as:
Linux:
luarocks install lua-cjson
Windows:
luarocks.exe install lua-cjson
Now you are ready to load this package from MTA. Do this in your Lua script file:
-- You should run this function once in your resource
initLuaPackage()
-- Load library
local json = require "cjson"
-- Use it
print( json.encode({ key = "example" }) )
It's done.
Tell me in PM, if you have any remarks and additional information for this tutorial. Thx