// under /vehicle command
format(vplates, sizeof(vplates), "%s%s%s-%s-%s%s%s", RandomPlate1, RandomPlate2, RandomPlate2, RandomPlate1, RandomPlate2, RandomPlate2, RandomPlate2);
VehicleInfo[vid][vPlates] = vplates;
SetVehicleNumberPlate(vid, VehicleInfo[vid][vPlates]);
SetVehicleToRespawn(vid);
new RandomPlate1[][] =
{
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"R",
"S",
"T",
"U",
"V",
"Z",
"W",
"X",
"Y"
};
new RandomPlate2[][] =
{
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
};
dhlptx|€ђ*¤Ё¬°ґёјАДA(,048
format(vplates, sizeof(vplates), "%s%d%d-%s-%d%d%d", LetterList[random(sizeof(LetterList))], random(10), random(10), LetterList[random(sizeof(LetterList))], random(10), random(10), random(10));
VehicleInfo[vid][vPlates] = vplates;
SetVehicleNumberPlate(vid, vplates);
SetVehicleToRespawn(vid);
new LetterList[26][] =
{
"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"
};
format(vplates, sizeof(vplates), "%c%d%d-%c-%d%d%d", random(26) + 65, random(10), random(10), random(26) + 65, random(10), random(10), random(10));
VehicleInfo[vid][vPlates] = vplates;
SetVehicleNumberPlate(vid, vplates);
SetVehicleToRespawn(vid);
new rand1 = random(sizeof(RandomPlate1));
new rand2 = random(sizeof(RandomPlate2));
new rand3 = random(sizeof(RandomPlate2));
new rand4 = random(sizeof(RandomPlate1));
new rand5 = random(sizeof(RandomPlate2));
new rand6 = random(sizeof(RandomPlate2));
new rand7 = random(sizeof(RandomPlate2));
format(vplates, sizeof(vplates), "%s%s%s-%s-%s%s%s", RandomPlate1[rand1], RandomPlate2[rand2], RandomPlate2[rand3], RandomPlate1[rand4], RandomPlate2[rand5], RandomPlate2[rand6], RandomPlate2[rand7]);
VehicleInfo[vid][vPlates] = vplates;
SetVehicleNumberPlate(vid, VehicleInfo[vid][vPlates]);
SetVehicleToRespawn(vid);
|
That's a horrible way to do it, but alright. Whatever suits you I guess..
|
format(vplates, sizeof(vplates), "%c%d%d-%c-%d%d%d", random(26) + 65, random(10), random(10), random(26) + 65, random(10), random(10), random(10));
VehicleInfo[vid][vPlates] = vplates;
SetVehicleNumberPlate(vid, vplates);
SetVehicleToRespawn(vid);
|
pawn Код:
|