14.03.2014, 21:56
Thank you, I already knew how to write:
It works !
Thanks a lot !
pawn Код:
#include <a_samp>
enum eLIST_INFO
{
l_int,
l_str[10],
Float:l_float
}
new List[][eLIST_INFO] = {
{2,"Test2",2.2},
{1,"Test1",1.1},
{4,"Test4",4.4},
{3,"Test3",3.3},
{5,"Test5",5.5}
};
stock BubbleSort(array[][],index = 0,start = 0,len = sizeof(array),len2 = sizeof(array[]))
{
for(new i=start;i<len-1+start;i++)
{
for(new j=start;j<len-1-i+start;j++)
{
if(array[j+1][index] < array[j][index])
{
for(new t;t<len2;t++)
{
new temp = array[j+1][t];
array[j+1][t] = array[j][t];
array[j][t] = temp;
}
}
}
}
return 1;
}
public OnFilterScriptInit()
{
BubbleSort(List,l_int);
for(new i;i<sizeof(List);i++) printf("%d %s %.f",List[i][l_int],List[i][l_str],List[i][l_float]);
return 1;
}
Thanks a lot !