if (!strcmp("/toplevel", cmdtext, true)) return Rank(playerid);
forward Rank(playerid);
public Rank(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[1000] = "",
player_Name[MAX_PLAYER_NAME]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Top -> {0CC6F5}%s {FFFFFF}- Level {00A600}%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
{
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {FF0000}%dє{FFFFFF} Top -> {FFB85C}No one", score_Text, i + 1);
}
}
ShowPlayerDialog(playerid, 2742, DIALOG_STYLE_MSGBOX, "{FFFFFF}Top 5{00A600} Level", score_Text, "Fechar", "");
return true;
}
pAdmin[playerid] == 6
forward Rank(playerid);
public Rank(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) && pAdmin[i] == 0)
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[1000] = "",
player_Name[MAX_PLAYER_NAME]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Top -> {0CC6F5}%s {FFFFFF}- Level {00A600}%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
{
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {FF0000}%dє{FFFFFF} Top -> {FFB85C}No one", score_Text, i + 1);
}
}
ShowPlayerDialog(playerid, 2742, DIALOG_STYLE_MSGBOX, "{FFFFFF}Top 5{00A600} Level", score_Text, "Fechar", "");
return true;
}
if (!strcmp("/toplevel", cmdtext, true))
{
if(pAdmin[playerid] >=1) return 0;
Rank(playerid);
return 1;
}
|
that is a very confusing post but from what i comprehended i'm thinking that u want to make admins prohibited to use that command? if so do this:
PHP код:
|
|
No, I want to make administrators not appear in rank and thus giving making the dispute between players get more competitive.
|
forward Rank(playerid);
public Rank(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) && pAdmin[i] == 0)
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[1000] = "",
player_Name[MAX_PLAYER_NAME]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Top -> {0CC6F5}%s {FFFFFF}- Level {00A600}%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
{
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {FF0000}%dє{FFFFFF} Top -> {FFB85C}No one", score_Text, i + 1);
}
}
ShowPlayerDialog(playerid, 2742, DIALOG_STYLE_MSGBOX, "{FFFFFF}Top 5{00A600} Level", score_Text, "Fechar", "");
return true;
}
|
No, I want to make administrators not appear in rank and thus giving making the dispute between players get more competitive.
|