Custom Plate Images For Vehicles
What Does This Do?
Well, simply put; you can change the background image for license plates! Once upon a time you were able to stream the vehshare.ytd
file to do this, however this is no longer possible.
This method uses a FiveM Native function to replace the texture via script.
How Do I Change The Plate Background To A Custom Image?
It’s pretty simple
- Use the template files provided below (Ensure the size has a ratio equivalent to that of
600x350
)1200x700
is possibly your best bet. - Customize the plate to your liking and save the file as a
.png
- upload the plate to an image website (I personally use Imgur)
- Get the raw image file URL (URL should end with a
.png
) - Paste your URL into the
config.lua
Examples
Possibly Important Stuff
First off, here are the template files
- Help Image | Raw – This is just an image to show where the license text will appear
- Empty Template | Raw – The actual empty license plate image
- [.PDN] Template – For those who use
Paint.NET
: this is the only file you’ll need
OR
Download the whole shabang here
Other Notes
Without configuration, this script will give in-game license plates a texture glitch
I will not be providing assistance with the creation of textures for the plates
Hey! Read Me For Extra Plate Info
Special thanks to @TheNeco for solving the multiple plate edit problem… (the one where you’d need 5 separate resources to do it) - Direct link will be updated once I arrive home
Another thanks to @ElusionPDX for finding another efficient way of using multiple plate textures:
Comment can be found here
Or you can view the code below
Code
plates = {
{"plate01","https://i.imgur.com/EwFuOJ5.png",370,188},
{"plate01_n","https://i.imgur.com/zPHE0X7.png",370,189},
{"plate02","https://i.imgur.com/nRjfQW6.png",368,189},
{"plate02_n","https://i.imgur.com/zC7LZ9q.png",300,160},
{"plate03","https://i.imgur.com/7LBC1NF.png",500,262},
{"plate03_n","https://i.imgur.com/jm3fgzs.png",300,160},
{"plate04_n","https://i.imgur.com/2BVHApg.png",300,154},
{"plate04","https://i.imgur.com/HCM9D5h.png",370,188},
{"plate05","https://i.imgur.com/lzCWWQq.png",370,187},
{"plate05_n","https://i.imgur.com/WS7DdbZ.png",370,187},
{"yankton_plate","https://i.imgur.com/AaYnMK9.png",734,361},
{"yankton_plate_n","https://i.imgur.com/FNb3UP8.png",256,128},
}
for l, p in pairs(plates) do
local txd = CreateRuntimeTxd("testing")
local duiObj = CreateDui(p[2], p[3], p[4])
local dui = GetDuiHandle(duiObj)
local tx = CreateRuntimeTextureFromDuiHandle(txd, "test", dui)
AddReplaceTexture("vehshare", p[1], "testing", "test")
end