need help /admins
#2

pawn Код:
CMD:admins(playerid, params[])
{
    new Count;
    new str[45], Admin[MAX_PLAYER_NAME];
    for(new i = 0; i <MAX_PLAYERS; i++)
    {
        if (APlayerData[i][PlayerLevel] >= 1) // replace with ur variable
        {
            Count++;
            GetPlayerName(i, Admin, MAX_PLAYER_NAME);
            SendClientMessage(playerid, -1, "Current Administrators Online");
            if(!IsOnAdminDuty[i]) format(str, sizeof(str), "Level %d - %s - Off Admin Duty", APlayerData[i][PlayerLevel], Admin);
            else if(IsOnAdminDuty[i]) format(str, sizeof(str), "Level %d - %s - On Admin Duty", APlayerData[i][PlayerLevel], Admin);
            SendClientMessage(playerid, -1, str);
        }
    }
    if(Count < 1) SendClientMessage(playerid, -1, "No Administrators Online!");
    return 1;
}
So many ways you could save lines. That should work for you, if all of the other variables are correct.
Reply


Messages In This Thread
need help /admins - by DerickClark - 28.01.2013, 02:13
Re: need help /admins - by Scenario - 28.01.2013, 02:18
Re: need help /admins - by DerickClark - 28.01.2013, 02:23
Re: need help /admins - by LeBoyce - 28.01.2013, 08:35

Forum Jump:


Users browsing this thread: 1 Guest(s)