So I have this Rank code and I wanted to block the admins from being in it and leaving it just for players, but I have no ideas on how to do it.
Can someone help me?
Here is the command
code:
My admin variable
Can someone help me?
Here is the command
Code:
if (!strcmp("/toplevel", cmdtext, true)) return Rank(playerid);
code:
Code:
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;
}
My admin variable
Code:
pAdmin[playerid] == 6