[ASK] How to make a string random
#1

Okay, i just want ask how to make a string value. If you don't know what i mean, i'll make a illustration.

-I want set a vehicle number plate. Then, i want make the the number plate combination between letters and numbers.
-Example : "XYZ 1903" .

Then, my question is : How to make a random value for "XYZ" ?

And sorry for my bad english.
Reply
#2

Easy, but why do loads of people say 'sorry for my bad english' yet their post was near-enough perfect English..?
Reply
#3

Like this:
pawn Код:
string[n] = random(26) + 'A';
Reply
#4

experiment with random like Ryder showed above.
Here is the wiki link to explain how it works because its hard to explain here. It's pretty easy to use though
https://sampwiki.blast.hk/wiki/Random
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)