Jump to content

Table sorting(vehicles-cp collected)


Iwasawa

Recommended Posts

Posted

Help me please!

I need help with table sorting, im working on AI racers script, and it works fairly good already, but i need to sort them by how many cps did they collect.

So i have the Vehicles as keys and the CP collected as value. How can i sort by value?

I store the keys as data in the vehicles so i can access the names table with the key of the vehicle.(the AI has names)

Posted

OR, is it a working solution to just refresh the whole table in every sec? I mean, i create a new empty table, and add them sorted by their points. Then next sec clear the table and do the same again. Or how do you do this?

Posted

Clearing the table won't hurt, perhaps a code provided would help us more efficiently to let you know better choice.

Although, refreshing tables isn't really CPU-Consuming stuff unless it is related with hugeass database.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...