Random phone number
#1

Hey guys!
I'm creating RolePlay server and i want to make phone number system.

Example: /phone will open GUI and you can select - Add phone number, Contacts List. If I press Add phone number, There will be INPUT style GUI where i can input phone number of other person and add them to contacts list. Is this possible? Input number to INPUT GUI and he will come up to other LIST style GUI? And then i type /phone and select Contacts List and that phone number will be?

If you will help me i will make phone system Filterscript and share with you!
Reply
#2

This is possible, only thing is you have to code it yourself. (Unless someone released it)

I already made a similar phone system, but I will add "Phone Numbers" later.
If you are interest in mine, you have to wait for a while, because I'm making it.

Do a search on forum..
Reply
#3

pawn Код:
new randphonenumer = 700000000 + random(45677823);

the GUI parts and dialog part is on you're own the code on top shows how to get a random number for the phone
Reply
#4

Very simple to generate a random "phone" number:
pawn Код:
stock GenerateRandomNumber(string[], const length = 8)
{
    for(new i; i < length; ++i)
    {
        string[i] = random(10) + '0';
    }
    return ;
}
Example:
pawn Код:
new
    string[12]
;
GenerateRandomNumber(string);
print(string);
Reply
#5

I know how to make random number but i want to know is this possible to input text in INPUT GUI and he will appear on LIST GUI? Example: i will input number 12345 and he appear in another LIST GUI. Or it will ask you phone number first (like 12345) and then ask name (like carter) that appear on LIST GUI and then i click that i will call or send text message to that number. Is this possible? And how long i have to wait until you make that system?
Reply
#6

Yes, you have to script an array to hold the numbers the player inputs in the list, like if you want the player to only be able to have 10 numbers your array would be
PlayerContacts[MAX_PLAYERS][10]
and that would store the numbers, then you LIST GUI would read the numbers from that list and display them
Reply
#7

So it have to be: new PlayerContact[MAX_PLAYERS][10]? Or it have to be with #Define?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)