Thank u, its working
Hey there, sorry to hear about that. Unfortunately I still don’t have a better way of doing this, however I will continue to search for one, and keep you posted
@nathangladney I created a pull request on your git repo which updates all 5 plates with the same texture, if separate textures for each plate is needed you just need to duplicate these few lines
local object = CreateDui(imageUrl, 540, 300) -- Load image into object
local handle = GetDuiHandle(object) -- Gets DUI handle from object
CreateRuntimeTextureFromDuiHandle(textureDic, "UniqueTextureName", handle) -- Creates the texture "UniqueTextureName" in the "duiTxd" dictionary
AddReplaceTexture('vehshare', 'plate02', 'duiTxd', 'UniqueTextureName') -- Applies "UniqueTextureName" from "duiTxd" to "plate02" from "vehshare"
Just change UniqueTextureName to anything but it must be unique and make sure AddReplaceTexture()
has the same name otherwise it will not change the texture.
Any issues let me know.
can always do it like this also.
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
GIT will be updated with the new file for multiple plates?
this works like a charm ty
NP happy to help
can everone say , to set the NPC etc KI Plate from 8 letter to 6 .?
I do like this but any plans on additional plates for vehicles?
Sick release man! Great job!
Is this server sided or client? is there a video explaining how to set this up?
@nathangladney Is that pull request (https://github.com/MASRPNathan-G/customplates/pull/1) going to be applied to the master ?
Great release, keep up the good work!
should i replace the whole plate.lua with this code ?
need a tutorial im too stupid for this pls.
or can someone upload a working plate.lua where i can download it?? with multiple different plates
This is the whole code. Change the URL to the images of the plates you want to be in game.
doesnt work for me… i replaced all the stuff in the plate.lua but the plates are still the old ones
Is it possible to add license plates using this aswell?
I would like to use these plates
Thanks for this! Is it possible to add additional “addon” plates, or we can only replace the current ones in game atm?