SA-MP Forums Archive
[HELP] Telephone number - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Telephone number (/showthread.php?tid=144123)



[HELP] Telephone number - F_Natic Official - 25.04.2010

Hey, I have started an RP script from 0, and I wanted the telephone numbers to be in this format:
555-w/e.. but I couldn't script it..

the phone number is getting saved, but it isn't in that format.

here's the code: new number = 100000 + random(899999);


Re: [HELP] Telephone number - Steven82 - 25.04.2010

Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
if you want the '-' [dash] character you need to make it a string, ("555-%d", PlayerNumberVar)

You could make a custom function that returns a string of a players number

Post your Player Info Number Variable [something like pInfo[playerid][PhoneNum]]

100000 + random(899999); will just make some random large integer and possibly won't work properly [everything has a limit]

I don't even think he made stuff like that yet i think he just thought it would work.


Re: [HELP] Telephone number - F_Natic Official - 26.04.2010

steven, I did. but thanks for the replies, I'll try to make it work.