How to order items by price?
An example:
PHP Code:
PS: These items are added with a native ... Example: zp_register_extra_item ("Super Gun", 30, ZP_TEAM_HUMAN) |
Re: How to order items by price?
Since I'm guessing you have 2 dynamic arrays that stores name and cost ArraySort() is out of the question since it won't match the other array.
You could either make your own sorting function using ArraySwap on both arrays to keep them synced. Another option is to create a new array that works like a key to both arrays and sort that using 1DCustom. I can't write it for you since the function you supplied is missing the name array... EDIT: Here's the basics of the first method: Code:
|
| All times are GMT -4. The time now is 18:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.