if(ServerInfo[ReadPMs] == 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
{
new string[128],recievername[MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sizeof(string)); GetPlayerName(id, recievername, sizeof(recievername));
format(string, sizeof(string), "***PM: %s To %s: %s", string, recievername, gMessage);
for (new a = 0; a < MAX_PLAYERS; a++) if ((PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && a != playerid)
SendClientMessage(a, grey, string);
SaveIn("PMs", string);
}
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pmName,sizeof(pmName));
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pmName,playerid,gMessage);
SendClientMessage(id,PM_INCOMING_COLOR,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
printf("PM: %s",Message);
return 1;
}
PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
It checks if their Level variable is not the Max Admin level, example:
Your admin level is 5, and the max level there is, it's 6. So it'd be if 5 is NOT 6, then continue. if(5 IS NOT 6) // |
(PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel])
(PlayerInfo[a][Level] >= 1)