How to set change format number plate vehicle in server side five M.. For example format "ABC 123" (Random letters and numbers)

How to set change format number plate vehicle in server side five M… For example format “ABC 123” (Random letters and numbers)

Hi @GangsterWorldMY,

I made a quick script which should achieve what you asked for, it’s not the nicest/cleanest example - but it should give you a rather good idea of where to start.

local letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
function random_plate()
    local plate
    for i=1,3 do
        local random_number = math.random(1, 26)
        plate = plate .. letters[random_number]
    end
    local random_number = math.random(100,999)
    plate = plate .. " " .. random_number
    return plate 
end

Thanks you … Where to put this script?

@GangsterWorldMY

Place it in your dedicated resource’s client.lua file.

Or you could just use the native designed to solve this exact problem

@MojitoBurrito

Thank you! Learnt something new :slight_smile:

where do i put this?

It’s a native, you use it to write some code