Help with variables prefixes?
#1

Hello all, today i scripted my Telephone system.
But, now there's a problem!

When you buy a Phone, it makes you a number using randoms. (es: random(999999))
But, how do i make a prefix like 392?
So, when you buy a Phone, your cellnumber is 39299999 (for ex)

Example:
You have bought a Phone, now your cellnumber is 392581235

THANKS, and sorry for bad english but i am for Italy.
Reply
#2

pawn Код:
format(string, sizeof(string), "392%i", random);
PlayerInfo[playerid][PhoneNumber] = string;
Something like this.
Reply
#3

why not simply

3920000 + random( 10000 );
Reply
#4

I prefer (if is that the correct verb, lol) the JhzRep method, but thanks admantis ^_^
Now, ill test it. You are Jenius peoples.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)