Random Plate bugs help
#1

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;
}
Its supposed to do for example AAA - 111 or BAS - 234 just random the first 3 a-z and last 3 0-9.

but it made this: яFCliams

which isnt correct...
Can someone help me out
Reply


Messages In This Thread
Random Plate bugs help - by Stefand - 09.12.2012, 12:22
Re: Random Plate bugs help - by Vince - 09.12.2012, 13:13
Re: Random Plate bugs help - by Stefand - 09.12.2012, 13:35
Re: Random Plate bugs help - by Vince - 09.12.2012, 13:45
Re: Random Plate bugs help - by Stefand - 09.12.2012, 14:36
Re: Random Plate bugs help - by deb014 - 09.12.2012, 15:34
Re: Random Plate bugs help - by Stefand - 09.12.2012, 15:41
Re: Random Plate bugs help - by Stefand - 09.12.2012, 16:09
Re: Random Plate bugs help - by deb014 - 09.12.2012, 16:19
Re: Random Plate bugs help - by Stefand - 09.12.2012, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)