07.06.2014, 23:57
Im trying to make a random vehicle's plates, for the vehicles you create with a cmd.
This is how I did it.
The example of licenses plates should be "A95-N-851"
RandomPlate1 and RandomPlate2 looks like this:
and this is what I get in plates:
This is how I did it.
The example of licenses plates should be "A95-N-851"
pawn Код:
// 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);
pawn Код:
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"
};
pawn Код:
dhlptx|€ђ*¤Ё¬°ґёјАДA(,048