• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Random letters and numbers
#3
(2020-11-25, 11:20 PM)Freaksken Wrote:
PHP Code:
printf("Random capital letter: %s",? 'A'  random('Z'-'A'  1));

printf("Random digit: %d"random(10)); 



It doesn't work when I use everything in the same string. need to generate vehicle plate.



Code:
format(string, sizeof(string), "%s %d %s %s",? 'A'  random('Z'-'A'  1), random(10), 'A'  random('Z'-'A'  1), 'A'  random('Z'-'A'  1));
  Reply


Messages In This Thread
Random letters and numbers - by Frajola - 2020-11-25, 10:18 PM
RE: Random letters and numbers - by Freaksken - 2020-11-25, 11:20 PM
RE: Random letters and numbers - by Frajola - 2020-11-26, 01:01 AM
RE: Random letters and numbers - by Kwarde - 2020-11-26, 02:27 AM
RE: Random letters and numbers - by Frajola - 2020-11-26, 03:40 AM

Forum Jump: