31.08.2011, 13:15
zcmd:
PS: testado no meu server mas talvez nao podera trabalhar no seu.se nao der,adicione isto:
PHP код:
COMMAND:admins(playerid, params[])
{
new AdminList[500], Name[24];
if (APlayerData[playerid][LoggedIn] == true)
{
for (new i; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, Name, sizeof(Name));
if (IsPlayerAdmin(i))
{
format(AdminList, 500, "%s%s: %s (id: %i), admin-level: %i (RCON admin)\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], Name, i, APlayerData[i][PlayerLevel]);
continue;
}
if (APlayerData[i][PlayerLevel] > 0)
{
format(AdminList, 500, "%s%s: %s (id: %i), admin-level: %i\n", AdminList, AdminLevelName[APlayerData[i][PlayerLevel]], Name, i, APlayerData[i][PlayerLevel]); // Add the name of the admin-player to the list
}
}
}
if (strlen(AdminList) > 0)
ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Online admins:", AdminList, "OK", "Cancel");
else
SendClientMessage(playerid, 0xFF0000FF, "No admin online"); // No admins are online
}
else
return 0;
return 1;
}
PHP код:
new AdminLevelName[6][24] =
{
{"Player"}, // Admin-level 0
{"Moderator"}, // Admin-level 1
{"Helper-admin"}, // Admin-level 2
{"Admin"}, // Admin-level 3
{"Head-admin"}, // Admin-level 4
{"Owner-admin"} // Admin-level 5
};