09.12.2012, 12:22
pawn Код:
stock getRandomLetter() {
return 65 + random(52); // ASCII Code of capital A is 65 + 2 * 26 for all other chars in alphabet.
}
stock GetFreeVehiclePlate()
{
for(new v = 0; v < MAX_VEHICLES; v ++)
{
new VPlate[255];
new randnumb = 1 + random(9);
format(VPlate, 255, "%c%c%c - %d%d%d", getRandomLetter(), getRandomLetter(), getRandomLetter(), randnumb,randnumb,randnumb);
if(strcmp(Vehicles[v][Plate], VPlate, true)) return v;
}
return -1;
}
but it made this: яFCliams
which isnt correct...
Can someone help me out