Convoy Trucking

Server related => Suggestions => Locked & Closed Suggestions => Topic started by: Jedi on May 31, 2012, 17:41

Title: order the restore list
Post by: Jedi on May 31, 2012, 17:41
Only a simple suggestion, i was wondering if it's possible made the list when you want to restore a random vehicle in an alphabetic order, because sometimes there is the need to restore only 1 car and not all with /restoreall, so it's nice to see the list in order so you can find the vehicle easier and faster.

(http://img535.imageshack.us/img535/2497/samp744r.png) (http://imageshack.us/photo/my-images/535/samp744r.png/)
not logic order
Title: Re: order the restore list
Post by: Lindsey on May 31, 2012, 18:14
I think you can /rm "carname"
Title: Re: order the restore list
Post by: $nake on May 31, 2012, 19:27
this list really should be with alphabetic order :)
Title: Re: order the restore list
Post by: The_Spinner on May 31, 2012, 19:37
Wow, I saw only in this pictrues 4 Club cars, gz man
Nice suggestion, +1 for it
Title: Re: order the restore list
Post by: DeHavilland on May 31, 2012, 21:44
1
Title: Re: order the restore list
Post by: Deff on June 01, 2012, 13:48
The list in /phone->services->car insurance can be in alphabetic order as well.
Title: Re: order the restore list
Post by: mick88 on June 01, 2012, 14:12
Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.
Title: Re: order the restore list
Post by: $nake on June 01, 2012, 23:51
Quote from: mick88 on June 01, 2012, 14:12
Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.
At least by IDs or something, not randomly :o
Title: Re: order the restore list
Post by: Storm94 on June 02, 2012, 00:31
Quote from: $nake on June 01, 2012, 23:51
Quote from: mick88 on June 01, 2012, 14:12
Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.
At least by IDs or something, not randomly :o

my guess is they are ordered by ID, at least when the server starts, but as you restore cars, and they get different IDs, they get randomized, and again, its a lot of work on the server to reorder an array.
Title: Re: order the restore list
Post by: $nake on June 02, 2012, 08:55
Quote from: Storm94 on June 02, 2012, 00:31
Quote from: $nake on June 01, 2012, 23:51
Quote from: mick88 on June 01, 2012, 14:12
Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.
At least by IDs or something, not randomly :o

my guess is they are ordered by ID, at least when the server starts, but as you restore cars, and they get different IDs, they get randomized, and again, its a lot of work on the server to reorder an array.
I meant by player ID of vehicles, like 1-75 for me :)
Title: Re: order the restore list
Post by: Lindsey on June 02, 2012, 14:04
Basically what mick said is, it would take ages to code, and then the server might lag everytime someone went into a list, as it tried to arrange it to look nice for you.

It's a waste of time for mick, and resources for the server to do this.
Title: Re: order the restore list
Post by: Deff on June 02, 2012, 17:04
and i think the array size used for vehicle player is large, because I see $nake got like 60-70 vehicles still he can buy more, and i saw a 30 slot house as well, 30X4=120, but i am not aware of samp scripting, I don't know about it, nor the server's script, or size or size of array, i am just imagining,
and yeah,
sorting them alphabetically = it will take so many loops depending on similarity of car names (like same names such as Roadtrain and Roadtrain) and array size (because it will compare just 2 letters of two words/cars in a single loop)
I think the worst case complexity can turn out to be O(n3) , even more, this really too much loops just for a simple command like /mycars.

So yeah its too much work for the server as it already has enough of processes going on.
So I agree with mick.


Quote from: $nake on June 02, 2012, 08:55
Quote from: Storm94 on June 02, 2012, 00:31
Quote from: $nake on June 01, 2012, 23:51
Quote from: mick88 on June 01, 2012, 14:12
Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.
At least by IDs or something, not randomly :o

my guess is they are ordered by ID, at least when the server starts, but as you restore cars, and they get different IDs, they get randomized, and again, its a lot of work on the server to reorder an array.
I meant by player ID of vehicles, like 1-75 for me :)

I think the IDs are given automatically when you buy the vehicle (it gets added as an element to next free array element). Its according to those ids (it will be according to when you bought them).
What you mean by player ids?
Title: Re: order the restore list
Post by: mick88 on June 02, 2012, 22:49
Quote from: Deff on June 02, 2012, 17:04
and i think the array size used for vehicle player is large, because I see $nake got like 60-70 vehicles still he can buy more, and i saw a 30 slot house as well, 30X4=120, but i am not aware of samp scripting, I don't know about it, nor the server's script, or size or size of array, i am just imagining,
and yeah,
sorting them alphabetically = it will take so many loops depending on similarity of car names (like same names such as Roadtrain and Roadtrain) and array size (because it will compare just 2 letters of two words/cars in a single loop)
I think the worst case complexity can turn out to be O(n3) , even more, this really too much loops just for a simple command like /mycars.

So yeah its too much work for the server as it already has enough of processes going on.
So I agree with mick.

Actually, I think the complexity will be O(n^2), because even though vehicle names would need additional loop, don't depend on the problem size (number of vehicles). But nice to see someone with basics of algorithms here.
Title: Re: order the restore list
Post by: ThomasKirkman on June 02, 2012, 22:54
Easy solution.  Sell 90% of those and only keep the 6 that you actually use.  Problem solved and parking freed up.
Title: Re: order the restore list
Post by: Storm94 on June 03, 2012, 01:07
Quote from: ThomasKirkman on June 02, 2012, 22:54
Easy solution.  Sell 90% of those and only keep the 6 that you actually use.  Problem solved and parking freed up.

This, I think, Is the best solution.