Do you want to use it in a bus or a train? I'm not sure, if I'm the only one with that behavior, but within scripts of busses, the usage of vehicle number is currently not working. But anyway, in trains (or theoretically also in busses) you can use the vehicle number with the variable veh_number. You can currently only find this variable in the German lexicon article System-Scriptvariablen und -Events, I couldn't find it in the English version of the article named System Scripting Variables and Events, they probably just forgot to update the English article.
Edit: Oops, Teneberus was faster. ![]()