Posts: 107
Threads: 34
Joined: Jun 2011
Reputation:
0
hi everyone how to make random vehicle number plate like: ASD 258 but this number save in mysql or .ini and when player go to kate numbers script check does this number exist if exist create another if not create and i want number take in checpoint, sorry for bad my english i think you undrestand what i say. Thanks
Posts: 1,046
Threads: 29
Joined: Mar 2010
pawn Код:
#define randomEx(%0,%1) (%0<%1?%0+random(%1-%0+1):%1+random(%0-%1+1))
//Then somewhere in your code...
new str[8];
format(str, sizeof(str), "%c%c%c %03d", randomEx('A', 'Z'), randomEx('A', 'Z'), randomEx('A', 'Z'), random(1000));
//After that compare the string with another ones in your files.