GetVehiclePlate
#8

Quote:
Originally Posted by Mikep
You can use this function to return a random letter:
pawn Код:
stock randomchar()
{
  new rand; rand = random(26);
  new chr[200];
  switch(rand)
  {
    case 0: format(chr,200,"%s","A");
    case 1: format(chr,200,"%s","B");
    case 2: format(chr,200,"%s","C");
    case 3: format(chr,200,"%s","D");
    case 4: format(chr,200,"%s","E");
    case 5: format(chr,200,"%s","F");
    case 6: format(chr,200,"%s","G");
    case 7: format(chr,200,"%s","H");
    case 8: format(chr,200,"%s","I");
    case 9: format(chr,200,"%s","J");
    case 10: format(chr,200,"%s","K");
    case 11: format(chr,200,"%s","L");
    case 12: format(chr,200,"%s","M");
    case 13: format(chr,200,"%s","N");
    case 14: format(chr,200,"%s","O");
    case 15: format(chr,200,"%s","P");
    case 16: format(chr,200,"%s","Q");
    case 17: format(chr,200,"%s","R");
    case 18: format(chr,200,"%s","S");
    case 19: format(chr,200,"%s","T");
    case 20: format(chr,200,"%s","U");
    case 21: format(chr,200,"%s","V");
    case 22: format(chr,200,"%s","W");
    case 23: format(chr,200,"%s","X");
    case 24: format(chr,200,"%s","Y");
    case 25: format(chr,200,"%s","Z");
  }
  return chr;
}
pawn Код:
randchar()
{
    return random(26) + 'A';
}
lol.
Reply


Messages In This Thread
GetVehiclePlate - by Coicatak - 21.02.2009, 14:02
Re: GetVehiclePlate - by Sandra18[NL] - 21.02.2009, 14:02
Re: GetVehiclePlate - by CruncH - 21.02.2009, 15:16
Re: GetVehiclePlate - by Coicatak - 22.02.2009, 08:11
Re: GetVehiclePlate - by Danut - 22.02.2009, 08:12
Re: GetVehiclePlate - by Mikep - 22.02.2009, 08:46
Re: GetVehiclePlate - by maij - 22.02.2009, 08:51
Re: GetVehiclePlate - by boylett - 22.02.2009, 09:14
Re: GetVehiclePlate - by Finn - 22.02.2009, 09:18
Re: GetVehiclePlate - by Mikep - 22.02.2009, 11:20

Forum Jump:


Users browsing this thread: 1 Guest(s)