Auto numeric vehicle plate

Hi, I have a question, how to set up the esx_vehicleshop script so that it numerically transmits license plates from the number of vehicles sold, e.g. abc 001, abc 002, abc 7890 etc. the number would mean that each subsequent vehicle purchased and would not be repeatable!

it just check database and if its repeated , generate new random plate

Are you able to write a line of code for that, I’m a little green in lua I prefer js: p

and it cannot be random, but must be consistent with the numbering