27.07.2010, 23:58
Try:
pawn Код:
new
sl,
rd[]= { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };
new
rand = random(sizeof(rd));
sl = rd[rand];
printf("%c Pos: %d", sl, rand);
pawn Код:
new
sl[2],
rd[26][] =
{
"A", "B", "C", "D", "E", "F", "G", "H", "I","J","K","L","M","N", "O","P","Q","R","S","T","U","V","W","X","Y","Z"
};
new
rand = random(sizeof(rd));
sl = rd[rand]; // 'B' '\0' 2 cells
printf("%s Pos: %d", sl, rand);