[HELP]Phone Number
#7

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.
Reply


Messages In This Thread
[HELP]Phone Number - by SkizzoTrick - 20.10.2010, 13:17
Re: [HELP]Phone Number - by kiss - 20.10.2010, 13:39
Re: [HELP]Phone Number - by SkizzoTrick - 20.10.2010, 13:43
Re: [HELP]Phone Number - by Cameltoe - 20.10.2010, 13:50
Re: [HELP]Phone Number - by Steven82 - 20.10.2010, 14:29
Re: [HELP]Phone Number - by Sergei - 20.10.2010, 14:34
Re: [HELP]Phone Number - by DeathOnaStick - 20.10.2010, 18:47
Re: [HELP]Phone Number - by SkizzoTrick - 20.10.2010, 19:40

Forum Jump:


Users browsing this thread: 5 Guest(s)