25.12.2014, 16:26
pawn Код:
// The command "/admins".
CMD:admins(playerid, params[])
{
new count = 1, string[828];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && adminLevel[i] >= 1)
{
// String
format(string, sizeof(string), "%s(%i) - Admin Level: %i\n",PlayerName(i), i, adminLevel[i]);
count ++;
}
}
if(count != 1)
{
// Shows the admins that are present
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Online Administrators", string, "Close", "");
}
else
{
// No admins online
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Online Admins", "{FFFFFF}There are no administrators online at the moment.", "OK", "");
}
}
return 1;
}
// The command "/helpers".
CMD:helpers(playerid, params[])
{
new count = 1, string[828];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && helperLevel[i] >= 1)
{
// String
format(string, sizeof(string), "%s(%i) - Helper Level: %i\n",PlayerName(i), i, helperLevel[i]);
count ++;
}
}
if(count != 1)
{
// Shows the helpers that are present
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Online Helpers", string, "Close", "");
}
else
{
// No helpers online
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Online Helpers", "{FFFFFF}There are no helpers online at the moment.", "OK", "");
}
}
return 1;
}