SA-MP Forums Archive
Sort array.HELP PLEASE! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sort array.HELP PLEASE! (/showthread.php?tid=662288)



Sort array.HELP PLEASE! - 3417512908 - 28.12.2018

If I have a array: PlayerInfo[5];
And it like this:
Код:
PlayerInfo[0] = 0
PlayerInfo[1] = 0
PlayerInfo[2] = 0
PlayerInfo[3] = 4
PlayerInfo[4] = 5
I want to move all number 0 to last(number 0 maybe not only 3,even not.The above code is just one of the cases)
Anyway to do that?
It shuold be this...:
Код:
PlayerInfo[0] = 4
PlayerInfo[1] = 5
PlayerInfo[2] = 0
PlayerInfo[3] = 0
PlayerInfo[4] = 0



Re: Sort array.HELP PLEASE! - d1git - 28.12.2018

md-sort

https://sampforum.blast.hk/showthread.php?tid=343172
https://raw.githubusercontent.com/os...er/md-sort.inc