My Phone System Question -
Zeromanster - 22.11.2009
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.
Re: My Phone System Question -
Zeromanster - 23.11.2009
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.
Re: My Phone System Question -
Zeromanster - 24.11.2009
BUMP ! BUMP ! BUMP !
Re: My Phone System Question -
*ToM* - 24.11.2009
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
Re: My Phone System Question -
Zeromanster - 24.11.2009
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.
Re: My Phone System Question -
Zeromanster - 25.11.2009
BUMP.
Re: My Phone System Question -
[NYRP]Mike. - 25.11.2009
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?
Re: My Phone System Question -
Zeromanster - 25.11.2009
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...
Re: My Phone System Question -
[NYRP]Mike. - 25.11.2009
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?
Re: My Phone System Question -
Joe Staff - 25.11.2009
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.