AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Order Array By Name ASC? (https://forums.alliedmods.net/showthread.php?t=326191)

colossus 07-21-2020 15:53

Order Array By Name ASC?
 
PHP Code:

ArraySort(g_sArrayNames"MySortFunc");

public 
MySortFunc(Array:ArrayXDitem1item2data[], data_size)
{
    new 
array1[32]
    new 
array2[32]
    
ArrayGetString(ArrayXDitem1array1charsmax(array1))
    
ArrayGetString(ArrayXDitem2array2charsmax(array2))
    
    
server_print("%s | vs | %s"array1array2)
    if( 
item1 item2 )
        return -
1;
    
    if( 
item1 item2 )
        return 
1;
        
    return 
0



OciXCrom 07-21-2020 16:04

Re: Order Array By Name ASC?
 
Code:
SortADTArray(g_sArrayNames, Sort_Ascending, Sort_String)

https://www.amxmodx.org/api/sorting/SortADTArray

colossus 07-21-2020 16:15

Re: Order Array By Name ASC?
 
That is for AMX 1.9 And for AMX 1.8.2?

thEsp 07-21-2020 16:58

Re: laziness
 
Quote:

Originally Posted by colossus (Post 2711053)
That is for AMX 1.9 And for AMX 1.8.2?

Unless you do it manually. I don't understand, what is it with people not willing to upgrade to 1.9? It offers more and better things just as in this case. We already got at 1.10 and people are lazy enough to upgrade even to 1.9. This really frustrates me.

colossus 07-21-2020 18:02

Re: Order Array By Name ASC?
 
Actually that versión isn't official
1.9 Don't have support for Orpheu.

meTaLiCroSS 07-21-2020 20:17

Re: Order Array By Name ASC?
 
Quote:

Originally Posted by colossus (Post 2711065)
Actually that versión isn't official
1.9 Don't have support for Orpheu.

I'm actually using Orpheu with 1.9. I can deduce that you have not even tried to prove. The only thing that cannot be used with Orpheu is ReHLDS/ReGameDLL, not really because of compat issues, its because the signature scanning is broken. (e.g. I'm using ReHLDS too with Orpheu but without ReGameDLL, and I CAN hook gamedll functions, but not engine ones)

thEsp 07-22-2020 03:52

Re: laziness
 
Quote:

Originally Posted by colossus (Post 2711065)
Actually that versión isn't official
1.9 Don't have support for Orpheu.

It is official. Already released and being maintained. It also works with Oprheu just fine. The only thing here is your laziness.

HamletEagle 07-22-2020 04:56

Re: laziness
 
Quote:

Originally Posted by thEsp (Post 2711115)
It is official. Already released and being maintained. It also works with Oprheu just fine. The only thing here is your laziness.

Nope. The latest stable version in 1.8.2. People should not be forced to switch to a potentially broken beta version. It's beta for a reason, you know?
1.9 is still in beta, but feature frozen. It's in a state where it should be fully tested and released as the new stable version, but I guess the dev team or whatever is left of it has other priorities.
1.10 is where new features are added.

About the other point, orpheu should work just fine with 1.9. The only potential issue I could see is the module not loading, but if it loads it should work.

thEsp 07-22-2020 05:55

Re: laziness
 
Quote:

Originally Posted by HamletEagle (Post 2711120)
Nope. The latest stable version in 1.8.2.

I never said 1.9 is the latest stable release, only that it is developed by AMXX team and therefore qualifies as official. I didn't realize it was frozen though.

OciXCrom 07-22-2020 07:43

Re: Order Array By Name ASC?
 
AMXX is backwards compatible. This means that newer versions will always have or support all the stuff that worked on older versions. It's not true that Orpheu doesn't work on 1.9.


All times are GMT -4. The time now is 20:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.