SA-MP Forums Archive
Phone System - 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: Phone System (/showthread.php?tid=249689)



Phone System - Tommy_Mandaz - 20.04.2011

Hello,

I want to know how can I make a system where it creates a random 4 or 5 digit phone number for each person who joins? Thanks


Re: Phone System - s0nic - 20.04.2011

Well you can use this from one of the many rp gm's:
new randphone = 100000 + random(899999);
It will give you 6 random numbers..


Re: Phone System - Tommy_Mandaz - 20.04.2011

Bump okay and when the person does /call [Number] How can I check if the players online have this number or not and then call them?


Re: Phone System - s0nic - 20.04.2011

Well you have to create a system man..you would store randphone into a players file..yea the best thing for you, i guess, is to look over a rp gm to understand how its put together.


Re: Phone System - Tommy_Mandaz - 20.04.2011

Yeah I understand the number making part but okay say I have 3 players on... and someone dials one of their numbers, how do I make the system look for that number and see if its online? I can then do the whole calling part.