[Pedido] SISTEMA DE RANK
#1

PHP код:
#define pasta_rank  "rank/rank_%s.ini"
public OnGameModeInit()
{
//ranks
SetTimer("AtualizarRank"40000*201);
createrank("Score");
createrank("Kill");
createrank("Money");
createrank("DueloW");
createrank("DueloL");
createrank("Procurado");
createrank("Hits");
createrank("MotoHits");
createrank("Vips");
//-------------------------------------------------------------------------------------------------------------------
    
if(dialogid == 5008)
    {
        return 
OnPlayerCommandText(playerid,"/top10");
    }
    if(
dialogid == 5009)
    {
        if(!
response)return 1;
        switch(
listitem)
        {
            case 
0:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Level"getrank("Score""Level"), "Voltar""");
            }
            case 
1:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Matou"getrank("Kill""Matou"), "Voltar""");
            }
            case 
2:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Dinheiro R$"getrank("Money""Dinheiro R$"), "Voltar""");
            }
            case 
3:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Duel Winners"getrank("DueloW""Duel Winners"), "Voltar""");
            }
            case 
4:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Duel Losers"getrank("DueloL""Duel Losers"), "Voltar""");
            }
            case 
5:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Procurado"getrank("Procurado""Procurado"), "Voltar""");
            }
            case 
6:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Hits"getrank("Hits""Hits"), "Voltar""");
            }
            case 
7:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » MotoHits"getrank("MotoHits""MotoHits"), "Voltar""");
            }
            case 
8:
            {
                
ShowPlayerDialog(playerid5008DIALOG_STYLE_MSGBOX"{00FF00}»{FFFFFF}Top 10 » Vips"getrank("Vips""Tempo"), "Voltar""");
            }
        }
        return 
1;
    }
//--------------------------------------------------------------------------------------------------
forward AtualizarRank();
public 
AtualizarRank()
{
    foreach(
Playeri)
    {
        if(
IsPlayerConnected(i))
        {
            
checkrank("Score",                 getPName(i), GetPlayerScore(i));
            
checkrank("Kill",                 getPName(i), Player[i][pMatou]);
               
checkrank("Money",                 getPName(i), GetPlayerMoney(i));
               
checkrank("DueloW",                getPName(i), wDuelos[i]);
               
checkrank("DueloL",                getPName(i), lDuelos[i]);
               
checkrank("Procurado",            getPName(i), Player[i][pProcurado]);
            
checkrank("Hits",                 getPName(i), Player[i][pRpt]);
            
checkrank("MotoHits",             getPName(i), Player[i][pHitsMtx]);
            
checkrank("Vips",                 getPName(i), Player[i][VIPExpira]);
            }
        }
    return 
1;
}
stock createrank(rankname[])
{
    new 
string[100];
    
format(stringsizeof stringpasta_rankrankname);
    if(!
DOF2_FileExists(string)){
        
DOF2_CreateFile(string);
        
//position 1
        
DOF2_SetString(string"name1""Ninguйm");
        
DOF2_SetInt(string"points1"0);
        
//position 2
        
DOF2_SetString(string"name2""Ninguйm");
        
DOF2_SetInt(string"points2"0);
        
//position 3
        
DOF2_SetString(string"name3""Ninguйm");
        
DOF2_SetInt(string"points3"0);
        
//position 4
        
DOF2_SetString(string"name4""Ninguйm");
        
DOF2_SetInt(string"points4"0);
        
//position 5
        
DOF2_SetString(string"name5""Ninguйm");
        
DOF2_SetInt(string"points5"0);
        
//position 6
        
DOF2_SetString(string"name6""Ninguйm");
        
DOF2_SetInt(string"points6"0);
        
//position 7
        
DOF2_SetString(string"name7""Ninguйm");
        
DOF2_SetInt(string"points7"0);
        
//position 8
        
DOF2_SetString(string"name8""Ninguйm");
        
DOF2_SetInt(string"points8"0);
        
//position 9
        
DOF2_SetString(string"name9""Ninguйm");
        
DOF2_SetInt(string"points9"0);
        
//position 10
        
DOF2_SetString(string"name10""Ninguйm");
        
DOF2_SetInt(string"points10"0);
        
//position 11 - EXTRA
        
DOF2_SetString(string"name11""Ninguйm");
        
DOF2_SetInt(string"points11"0);
        
//save
        
DOF2_SaveFile();
        
printf("#rank %s criado com sucesso"rankname);
    }
    return 
1;
}
stock resetrank(rankname[])
{
    new 
string[100];
    
format(stringsizeof stringpasta_rankrankname);
    if(
DOF2_FileExists(string)){
        
DOF2_SetString(string,         "name1""Ninguйm");
        
DOF2_SetInt(string,         "points1"0);
        
DOF2_SetString(string,         "name2""Ninguйm");
        
DOF2_SetInt(string,         "points2"0);
        
DOF2_SetString(string,         "name3""Ninguйm");
        
DOF2_SetInt(string,         "points3"0);
        
DOF2_SetString(string,         "name4""Ninguйm");
        
DOF2_SetInt(string,         "points4"0);
        
DOF2_SetString(string,         "name5""Ninguйm");
        
DOF2_SetInt(string,         "points5"0);
        
DOF2_SetString(string,         "name6""Ninguйm");
        
DOF2_SetInt(string,         "points6"0);
        
DOF2_SetString(string,         "name7""Ninguйm");
        
DOF2_SetInt(string,         "points7"0);
        
DOF2_SetString(string,         "name8""Ninguйm");
        
DOF2_SetInt(string,         "points8"0);
        
DOF2_SetString(string,         "name9""Ninguйm");
        
DOF2_SetInt(string,         "points9"0);
        
DOF2_SetString(string,         "name10""Ninguйm");
        
DOF2_SetInt(string,         "points10"0);
        
//position 11 - EXTRA
        
DOF2_SetString(string"name11""Ninguйm");
        
DOF2_SetInt(string"points11"0);
        
//save
        
DOF2_SaveFile();
        
printf("#rank %s foi resetado"rankname);
    }
    return 
1;
}
stock deleterank(rankname[])
{
    new 
string[100];
    
format(stringsizeof stringpasta_rankrankname);
    if(
DOF2_FileExists(string)){
        
DOF2_RemoveFile(file);
        
printf("#rank %s foi deletado com sucesso"rankname);
    }
    return 
1;
}
stock getrank(rankname[], description[])
{
    new 
buffer[1600], file[1100], string[1200];
    
format(filesizeof filepasta_rankrankname);
    
//rank 1
    
format(stringsizeof string"{00FF00}1°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name1"), descriptionDOF2_GetInt(file"points1"));
    
strcat(bufferstring);
    
//rank 2
    
format(stringsizeof string"{00FF00}2°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name2"), descriptionDOF2_GetInt(file"points2"));
    
strcat(bufferstring);
    
//rank 3
    
format(stringsizeof string"{00FF00}3°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name3"), descriptionDOF2_GetInt(file"points3"));
    
strcat(bufferstring);
    
//rank 4
    
format(stringsizeof string"{00FF00}4°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name4"), descriptionDOF2_GetInt(file"points4"));
    
strcat(bufferstring);
    
//rank 5
    
format(stringsizeof string"{00FF00}5°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name5"), descriptionDOF2_GetInt(file"points5"));
    
strcat(bufferstring);
    
//rank 6
    
format(stringsizeof string"{00FF00}6°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name6"), descriptionDOF2_GetInt(file"points6"));
    
strcat(bufferstring);
    
//rank 7
    
format(stringsizeof string"{00FF00}7°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name7"), descriptionDOF2_GetInt(file"points7"));
    
strcat(bufferstring);
    
//rank 8
    
format(stringsizeof string"{00FF00}8°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name8"), descriptionDOF2_GetInt(file"points8"));
    
strcat(bufferstring);
    
//rank 9
    
format(stringsizeof string"{00FF00}9°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name9"), descriptionDOF2_GetInt(file"points9"));
    
strcat(bufferstring);
    
//rank 10
    
format(stringsizeof string"{00FF00}10°. {FFFFFF}%s - {00FF00}%s: {FFFFFF}%d\n"DOF2_GetString(file"name10"), description DOF2_GetInt(file"points10"));
    
strcat(bufferstring);
    return 
buffer;
}
stock FixSpaces2(rankname[])
{
    new 
file[100], bool:mudanca=false;
    
format(filesizeof filepasta_rankrankname);
    new
        
name1[50],points1,
        
name2[50],points2,
        
name3[50],points3,
        
name4[50],points4,
        
name5[50],points5,
        
name6[50],points6,
        
name7[50],points7,
        
name8[50],points8,
        
name9[50],points9,
        
name10[50],points10,
        
name11[50],points11;
    
format(name1sizeof name1DOF2_GetString(file"name1"));
    
points1 DOF2_GetInt(file"points1");
    
format(name2sizeof name2DOF2_GetString(file"name2"));
    
points2 DOF2_GetInt(file"points2");
    
format(name3sizeof name3DOF2_GetString(file"name3"));
    
points3 DOF2_GetInt(file"points3");
    
format(name4sizeof name4DOF2_GetString(file"name4"));
    
points4 DOF2_GetInt(file"points4");
    
format(name5sizeof name5DOF2_GetString(file"name5"));
    
points5 DOF2_GetInt(file"points5");
    
format(name6sizeof name6DOF2_GetString(file"name6"));
    
points6 DOF2_GetInt(file"points6");
    
format(name7sizeof name7DOF2_GetString(file"name7"));
    
points7 DOF2_GetInt(file"points7");
    
format(name8sizeof name8DOF2_GetString(file"name8"));
    
points8 DOF2_GetInt(file"points8");
    
format(name9sizeof name9DOF2_GetString(file"name9"));
    
points9 DOF2_GetInt(file"points9");
    
format(name10sizeof name10DOF2_GetString(file"name10"));
    
points10 DOF2_GetInt(file"points10");
    
format(name11sizeof name11DOF2_GetString(file"name11"));
    
points11 DOF2_GetInt(file"points11");
    if(
points1 1)
    {
        
mudanca=true;
        
format(name1sizeof name1name2);points1=points2;
        
format(name2sizeof name2name3);points2=points3;
        
format(name3sizeof name3name4);points3=points4;
        
format(name4sizeof name4name5);points4=points5;
        
format(name5sizeof name5name6);points5=points6;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points2 1)
    {
        
mudanca=true;
        
format(name2sizeof name2name3);points2=points3;
        
format(name3sizeof name3name4);points3=points4;
        
format(name4sizeof name4name5);points4=points5;
        
format(name5sizeof name5name6);points5=points6;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points3 1)
    {
        
mudanca=true;
        
format(name3sizeof name3name4);points3=points4;
        
format(name4sizeof name4name5);points4=points5;
        
format(name5sizeof name5name6);points5=points6;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points4 1)
    {
        
mudanca=true;
        
format(name4sizeof name4name5);points4=points5;
        
format(name5sizeof name5name6);points5=points6;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points5 1)
    {
        
mudanca=true;
        
format(name5sizeof name5name6);points5=points6;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points6 1)
    {
        
mudanca=true;
        
format(name6sizeof name6name7);points6=points7;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points7 1)
    {
        
mudanca=true;
        
format(name7sizeof name7name8);points7=points8;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points8 1)
    {
        
mudanca=true;
        
format(name8sizeof name8name9);points8=points9;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points9 1)
    {
        
mudanca=true;
        
format(name9sizeof name9name10);points9=points10;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
points10 1)
    {
        
mudanca=true;
        
format(name10sizeof name10name11);points10=points11;
    }
    if(
mudanca)
    {
        
DOF2_SetString(file,         "name1",     name1);
        
DOF2_SetInt(file,         "points1",     points1);
        
DOF2_SetString(file,         "name2",     name2);
        
DOF2_SetInt(file,         "points2",     points2);
        
DOF2_SetString(file,         "name3",     name3);
        
DOF2_SetInt(file,         "points3",     points3);
        
DOF2_SetString(file,         "name4",     name4);
        
DOF2_SetInt(file,         "points4",     points4);
        
DOF2_SetString(file,         "name5",     name5);
        
DOF2_SetInt(file,         "points5",     points5);
        
DOF2_SetString(file,         "name6",     name6);
        
DOF2_SetInt(file,         "points6",     points6);
        
DOF2_SetString(file,         "name7",     name7);
        
DOF2_SetInt(file,         "points7",     points7);
        
DOF2_SetString(file,         "name8",     name8);
        
DOF2_SetInt(file,         "points8",     points8);
        
DOF2_SetString(file,         "name9",     name9);
        
DOF2_SetInt(file,         "points9",     points9);
        
DOF2_SetString(file,         "name10",     name10);
        
DOF2_SetInt(file,         "points10",     points10);
        
DOF2_SaveFile();
    }
    return 
1;
}
stock removenamerank(rankname[], removename[])
{
    new 
file[100], name[15], points[15], bool:temnick=false;
    
format(filesizeof filepasta_rankrankname);
    for(new 
i=111i++)
    {
        
format(namesizeof name"name%d"i);
        
format(pointssizeof points"points%d"i);
        if(!
strcmp(removenameDOF2_GetString(filename), true)){
            
temnick=true;
            
DOF2_SetString(file,         name"Ninguйm");
            
DOF2_SetInt(file,             points0);
            break;
        }
    }
    if(
temnick){
        
DOF2_SaveFile();
    }
    return 
1;
}
stock checkrank(rankname[], name[], points)
{
    new 
string[100];
    
format(stringsizeof stringpasta_rankrankname);
    
removenamerank(ranknamename);
    new
        
name1[50],points1,
        
name2[50],points2,
        
name3[50],points3,
        
name4[50],points4,
        
name5[50],points5,
        
name6[50],points6,
        
name7[50],points7,
        
name8[50],points8,
        
name9[50],points9,
        
name10[50],points10,
        
name11[50],points11;
    
format(name1sizeof name1DOF2_GetString(string"name1"));
    
points1 DOF2_GetInt(string"points1");
    
format(name2sizeof name2DOF2_GetString(string"name2"));
    
points2 DOF2_GetInt(string"points2");
    
format(name3sizeof name3DOF2_GetString(string"name3"));
    
points3 DOF2_GetInt(string"points3");
    
format(name4sizeof name4DOF2_GetString(string"name4"));
    
points4 DOF2_GetInt(string"points4");
    
format(name5sizeof name5DOF2_GetString(string"name5"));
    
points5 DOF2_GetInt(string"points5");
    
format(name6sizeof name6DOF2_GetString(string"name6"));
    
points6 DOF2_GetInt(string"points6");
    
format(name7sizeof name7DOF2_GetString(string"name7"));
    
points7 DOF2_GetInt(string"points7");
    
format(name8sizeof name8DOF2_GetString(string"name8"));
    
points8 DOF2_GetInt(string"points8");
    
format(name9sizeof name9DOF2_GetString(string"name9"));
    
points9 DOF2_GetInt(string"points9");
    
format(name10sizeof name10DOF2_GetString(string"name10"));
    
points10 DOF2_GetInt(string"points10");
    
format(name11sizeof name11DOF2_GetString(string"name11"));
    
points11 DOF2_GetInt(string"points11");
    if(
points points1)
    {
        
DOF2_SetString(string,         "name2",     name1);
        
DOF2_SetInt(string,         "points2",     points1);
        
DOF2_SetString(string,         "name3",     name2);
        
DOF2_SetInt(string,         "points3",     points2);
        
DOF2_SetString(string,         "name4",     name3);
        
DOF2_SetInt(string,         "points4",     points3);
        
DOF2_SetString(string,         "name5",     name4);
        
DOF2_SetInt(string,         "points5",     points4);
        
DOF2_SetString(string,         "name6",     name5);
        
DOF2_SetInt(string,         "points6",     points5);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
//set rank
        
DOF2_SetString(string,         "name1",     name);
        
DOF2_SetInt(string,         "points1",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points2)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name3",     name2);
        
DOF2_SetInt(string,         "points3",     points2);
        
DOF2_SetString(string,         "name4",     name3);
        
DOF2_SetInt(string,         "points4",     points3);
        
DOF2_SetString(string,         "name5",     name4);
        
DOF2_SetInt(string,         "points5",     points4);
        
DOF2_SetString(string,         "name6",     name5);
        
DOF2_SetInt(string,         "points6",     points5);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name2",     name);
        
DOF2_SetInt(string,         "points2",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points3)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name4",     name3);
        
DOF2_SetInt(string,         "points4",     points3);
        
DOF2_SetString(string,         "name5",     name4);
        
DOF2_SetInt(string,         "points5",     points4);
        
DOF2_SetString(string,         "name6",     name5);
        
DOF2_SetInt(string,         "points6",     points5);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name3",     name);
        
DOF2_SetInt(string,         "points3",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points4)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name5",     name4);
        
DOF2_SetInt(string,         "points5",     points4);
        
DOF2_SetString(string,         "name6",     name5);
        
DOF2_SetInt(string,         "points6",     points5);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name4",     name);
        
DOF2_SetInt(string,         "points4",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points5)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name6",     name5);
        
DOF2_SetInt(string,         "points6",     points5);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name5",     name);
        
DOF2_SetInt(string,         "points5",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points6)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name6",     name);
        
DOF2_SetInt(string,         "points6",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points6)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name7",     name6);
        
DOF2_SetInt(string,         "points7",     points6);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name6",     name);
        
DOF2_SetInt(string,         "points6",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points7)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name8",     name7);
        
DOF2_SetInt(string,         "points8",     points7);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name7",     name);
        
DOF2_SetInt(string,         "points7",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points8)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name9",     name8);
        
DOF2_SetInt(string,         "points9",     points8);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name8",     name);
        
DOF2_SetInt(string,         "points8",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points9)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name10",     name9);
        
DOF2_SetInt(string,         "points10",    points9);
        
DOF2_SetString(string,         "name9",     name);
        
DOF2_SetInt(string,         "points9",     points);
        
//save
        
DOF2_SaveFile();
    }
    else if(
points points10)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name10",     name);
        
DOF2_SetInt(string,         "points10"points);
        
//save
        
DOF2_SaveFile();
    }
    
//Extra
    
else if(points points11)
    {
        
//removenamerank(rankname, name);
        
DOF2_SetString(string,         "name11",     name);
        
DOF2_SetInt(string,         "points11"points);
        
//save
        
DOF2_SaveFile();
    }
    
FixSpaces2(rankname);
    return 
1;

Bom meu sistema de rank e estй como posso colocar pra online tipo enves de abrir uma DIALOG_STYLE_MSGBOX Toda vez q algum membro alcance o nivel de outro player ou de kil aparece no chat global tipo assim
Код:
Top Rank .: O "Aki o nick do player " e o mais viciado do servido com 1000 score a mesma coisa com kil duelos etc.
alguem podoe me dizer?
Reply
#2

Nгo precisa de sistema de Rank para isso, so fazer uma verificaзгo se a variavel chegou a 1000 e tal...
Reply
#3

vc fez um ne vintedois
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)