24.10.2015, 10:38
You do not need that code "#pragma unused params".
Also you are using loops but you never used the loop, you instead used playerid (I replaced them with i).
Another note, The message you put inside the loop excluding the part of listing the admins, will spam the screen. (": : Admins : :, etc..")
Also you are using loops but you never used the loop, you instead used playerid (I replaced them with i).
Another note, The message you put inside the loop excluding the part of listing the admins, will spam the screen. (": : Admins : :, etc..")
PHP код:
command(staff, playerid, params[])
{
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(playerid, COLOR_ORANGE, ". : : Administrators : : .");
if(PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "Name: %s{A9C4E4}: (Level %d) {%s}", RPName(i), PlayerInfo[i][pAdmin], GetAwayStatus(i));
SendClientMessage(playerid, GREY, string);
}
SendClientMessage(playerid, COLOR_ORANGE, ". : : Moderators : : .");
if(PlayerInfo[i][pModerator] >= 1)
{
format(string, sizeof(string), "Name: %s{A9C4E4} {%s}", RPName(i), GetAwayStatus(i));
SendClientMessage(i, GREY, string);
}
SendClientMessage(playerid, COLOR_ORANGE, ". : : Helpers : : .");
if(PlayerInfo[i][pHelper] >= 1)
{
format(string, sizeof(string), "Name: %s{A9C4E4} {%s}", RPName(i), GetAwayStatus(i));
SendClientMessage(playerid, GREY, string);
}
}
}
}