My Phone System Question
#1

I didn't like the plain old Godfather giving number system so i created my own.

It works like this: When the player is registering they choose a phone number and when they choose a phone number server creates a blank file in the /scriptfiles/phonenumbers/ folder. That would make the phone number taken.

If somebody else wants it, server would check does the phone number file exist and if yes, player would get a message saying that the phone number is taken.

Well, this phone number hunting can be a real pain when 10000 numbers are already taken so i was thinking to make a textdraw with suggestions, where there would be 5 number suggestions.

And now the question: Im stuck, i don't know how to create the suggestions... so could you please give me an idea or sample code ?

Thank you very much.
Reply
#2

BUMP.

EDIT: I've got an idea and here's how i did it:

I've created a loop from 1000 till 100000 and it loops until it gets 5 available numbers (fexist) that are going to the suggestions tab (textdraw).

I've just have a simple question now, will this loop lagg the server ?

Thank you for your answers.
Reply
#3

BUMP ! BUMP ! BUMP !
Reply
#4

Quote:

I've just have a simple question now, will this loop lagg the server ?

you can check it by yourself :P it's better than waiting for some answer in here
Reply
#5

Quote:
Originally Posted by Toniu_
Quote:

I've just have a simple question now, will this loop lagg the server ?

you can check it by yourself :P it's better than waiting for some answer in here
Well i can, but on a test server with 2-3 players max ... I want an answer from someone skillful who can give me an answer in theory would this loop lagg for a server with 40 - 50 players online.
Reply
#6

BUMP.
Reply
#7

alright what is it exactly you want to do, you've put the phonenumbers in /scriptfiles/numbers/ created the loop from 10000 > 100000? & want the textdraw to show 5 numbers in that loop that havnt been taken?
Reply
#8

Quote:
Originally Posted by ♣ ©ⓤⓝⓔⓞ ♣
alright what is it exactly you want to do, you've put the phonenumbers in /scriptfiles/numbers/ created the loop from 10000 > 100000? & want the textdraw to show 5 numbers in that loop that havnt been taken?
Yes, i just don't know is it okay to create such a big loop and im woried it will lagg my server...
Reply
#9

I'm sure it will be fine but make sure that you dont go over 100000 and you should be fine also, i too use a loop this size and i dont appear to recieve any lagg but i suppose it depends on your host?
Reply
#10

And it also highly depends on your scripting optimization. If you're doing something like opening and closing a file every time you loop then you're going to have a bad time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)