How can i make random numbers like that?
#1

I want a "random" script to create a number like that: 0728799808 Well i want to start with 072 and 7 numbers... how?
Reply
#2

I honestly could not understand you, but well, if you want something to be random, use this:

https://sampwiki.blast.hk/wiki/Random
Reply
#3

pawn Код:
new phone[11];
new number = random(9999999);
if(number < 1000000) format(phone, sizeof(phone), "0%i", number);
format(phone, sizeof(phone), "072%s", phone);
Reply
#4

I'd use something like that!
pawn Код:
new
    phone[ 11 ]
;
format( phone, sizeof( phone ), "072%d%d%d%d%d%d%d", random( 10 ), random( 10 ), random( 10 ), random( 10 ), random( 10 ), random( 10 ), random( 10 ) );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)