I'm need command /admins
#1

Hello, I'm have a command "admins" and it writes me "error"
can someone to do?
I'm need a command 'admins' to see admins online.
my function in admin mod:
GetPVarInt > Level
CMD:admins(playerid,params[])
thanks you..
Reply
#2

You should have explained it better...
Maybe:
pawn Код:
CMD:admins(playerid, params[])
{
    SendClientMessage(playerid, 0xffff00ff, "Online admins:");
    new isAdminOnline = false;
    new adminLine[64], adminName[MAX_PLAYER_NAME];
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (GetPVarInt(i, "Level") >= 1) // change 1 to the the minimum admin level
        {
            isAdminOnline = true;
            GetPlayerName(i, adminName, MAX_PLAYER_NAME);
            format(adminLine, sizeof adminLine, "%s - Level: %d", adminName, GetPVarInt(i, "Level"));
            SendClientMessage(playerid, 0x00ff00ff, adminLine);
        }
    }
    if (!isAdminOnline) SendClientMessage(playerid, 0xff0000ff, "There are no admins online.");
    return 1;
}
Reply
#3

Quote:
Originally Posted by KoczkaHUN
Посмотреть сообщение
You should have explained it better...
Maybe:
pawn Код:
CMD:admins(playerid, params[])
{
    SendClientMessage(playerid, 0xffff00ff, "Online admins:");
    new isAdminOnline = false;
    new adminLine[64], adminName[MAX_PLAYER_NAME];
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (GetPVarInt(i, "Level") >= 1) // change 1 to the the minimum admin level
        {
            isAdminOnline = true;
            GetPlayerName(i, adminName, MAX_PLAYER_NAME);
            format(adminLine, sizeof adminLine, "%s - Level: %d", adminName, GetPVarInt(i, "Level"));
            SendClientMessage(playerid, 0x00ff00ff, adminLine);
        }
    }
    if (!isAdminOnline) SendClientMessage(playerid, 0xff0000ff, "There are no admins online.");
    return 1;
}
Yes, thank you-
working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)