pawn Код:
enum top_score {
Top1[128],
Top2[128],
Top3[128],
}
new TopScore[top_score];
forward salvarScore(); public salvarScore() //by Ricop522
{
if(fexist("top.ini"))
{
dini_Set( "top.ini", "Top1", TopScore[Top1]);
dini_Set( "top.ini", "Top2", TopScore[Top2]);
dini_Set( "top.ini", "Top3", TopScore[Top3]);
}
else
{
dini_Create("top.ini");
dini_Set( "top.ini", "Top1", "N/A");
dini_Set( "top.ini", "Top2", "N/A");
dini_Set( "top.ini", "Top3", "N/A");
}
return 0x01;
}
stock carregarTop() { //by Ricop522
if(fexist("top.ini"))
{
TopScore[top1] = dini_Get("top.ini", "Top1");
TopScore[top2] = dini_Get("top.ini", "Top2");
TopScore[top3] = dini_Get("top.ini", "Top3");
}
else
{
dini_Create("top.ini");
dini_Set( "top.ini", "Top1", "N/A");
dini_Set( "top.ini", "Top2", "N/A");
dini_Set( "top.ini", "Top3", "N/A");
}
return 0x01;
}
Getando informaзхes tops:
pawn Код:
if(!strcmp(cmd, "/tops", true))
{
new j_string[0x80];
format(j_string, sizeof(j_string), "Top1: %s\nTop2:%s\nTop3:%s", TopScore[top1],TopScore[top2],TopScore[top3]);
ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "[Credits by Ricop522]", j_string, "OK", " ");
return true;
}
O resto para pegar os maiores score's isso, vocк faz ae.
Espero ter ajudado, nгo remova os crйditos : P