/admins command help
#3

This is a more efficient usage of the code:
pawn Code:
COMMAND:admins(playerid, params[])
{
    new str[30], count = 0;
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(pInfo[i][pAdmin] < 1) continue;
        if(count == 0) SendClientMessage(playerid,0x9BBDDEAA,"Present Staff Members:");
        new name[MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));
        format(str, sizeof(str), "%s(%d)", name, i);
        SendClientMessage(playerid, 0x9BBDDEAA, str);
        count++;
    }
    if(count == 0) return SendClientMessage(playerid,0x9BBDDEAA,"No Admins online");
    return 1;
}
Reply


Messages In This Thread
/admins command help - by ZBits - 23.12.2013, 08:27
Re: /admins command help - by park4bmx - 23.12.2013, 09:11
Re: /admins command help - by Threshold - 23.12.2013, 15:06
Re: /admins command help - by ZBits - 23.12.2013, 20:21
Re: /admins command help - by ZBits - 23.12.2013, 20:26
Re: /admins command help - by mamorunl - 23.12.2013, 23:56
Re: /admins command help - by ZBits - 24.12.2013, 00:38
Re: /admins command help - by Threshold - 24.12.2013, 02:32
Re: /admins command help - by mamorunl - 24.12.2013, 14:12
Re: /admins command help - by ZBits - 24.12.2013, 20:22

Forum Jump:


Users browsing this thread: 1 Guest(s)