Quote:
Originally Posted by Sergei
You can't really have 0 on the first place because 00000000001 would be automatically changed to 1.
pawn Код:
new randphone = 700000000 + random(45677823);
This way, 7 would be at the first place and number would be always 9 digits long.
|
Anyway, it would be possible to not save it as an Integer, but as a String. If you would save it as a string, and work with it like one, it would be possible. For that you'd need to make it like this:
pawn Код:
new bleh[128];
format(bleh, sizeof(bleh), "07%i", random(45677823));
strval(bleh) would equal the string as an Integer, which isn't needed at all i guess.
Just use strcmp to check if the string and the phone-number are the same.