order the restore list

Started by Jedi, May 31, 2012, 17:41

Jedi

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.


not logic order


[hide=quotes]
Quote from: Joshy on August 31, 2012, 16:16
Go Jedi!
Quote from: Vado19 on March 08, 2013, 00:03
i no longer want to taste that cake because jedi fapped all over it.....
[/hide]

Lindsey

I think you can /rm "carname"
View my news story : http://www.forum.convoytrucking.net/index.php/topic,39051.new.html#new
[hide=awesomeness]
Lindsey ~ Sticking up for the little guy - http://www.forum.convoytrucking.net/index.php/topic,39070.0.html
Quote[21:11:49] Lindsey_[UK] managed to steal Alpha
[21:11:49] Lindsey_[UK] left the server (exit)
[21:12:17] * ExAdmin Lindsey_[UK] (41) connected: I will report you, count on it
[21:12:22] <krisu> that was good linds :D
Quote from: brane on June 06, 2013, 10:53
Quote from: Lindsey on June 06, 2013, 08:37
Terror, youve been on your last warning for stuff on ct for like a year so I dont feel treatened by you
Buuuuuuuuuurn

[/hide]

$nake

this list really should be with alphabetic order :)

The_Spinner

Wow, I saw only in this pictrues 4 Club cars, gz man
Nice suggestion, +1 for it

DeHavilland

[hide=Our Renault Dauphine]
80's

90's

2007

2014 with new team colour

[/hide]

Deff

The list in /phone->services->car insurance can be in alphabetic order as well.

mick88

Nope.
Ordering array alphabetically it a lot of work for me and the server each time the list is displayed.

$nake

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

Storm94

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'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

$nake

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 :)

Lindsey

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.
View my news story : http://www.forum.convoytrucking.net/index.php/topic,39051.new.html#new
[hide=awesomeness]
Lindsey ~ Sticking up for the little guy - http://www.forum.convoytrucking.net/index.php/topic,39070.0.html
Quote[21:11:49] Lindsey_[UK] managed to steal Alpha
[21:11:49] Lindsey_[UK] left the server (exit)
[21:12:17] * ExAdmin Lindsey_[UK] (41) connected: I will report you, count on it
[21:12:22] <krisu> that was good linds :D
Quote from: brane on June 06, 2013, 10:53
Quote from: Lindsey on June 06, 2013, 08:37
Terror, youve been on your last warning for stuff on ct for like a year so I dont feel treatened by you
Buuuuuuuuuurn

[/hide]

Deff

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?

mick88

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.

ThomasKirkman

Easy solution.  Sell 90% of those and only keep the 6 that you actually use.  Problem solved and parking freed up.

Storm94

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.

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.