/admins command help
#2

pawn Code:
COMMAND:admins(playerid, params[])
{
new AStr[240],FStr[240],CounT=0;
for(new i=0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i) && pInfo[i][pAdmin] >= 1)
    {
        new name[MAX_PLAYER_NAME];CounT++;
        GetPlayerName(i, name, sizeof(name));
        format(AStr, sizeof(AStr), "%s(%d)\n",name,i);
        strcat(FStr, AStr, sizeof(FStr));
    }
}
if(CounT>0){
    SendClientMessage(playerid,0x9BBDDEAA,"Present Staff Members:");
    SendClientMessage(playerid,0x9BBDDEAA,FStr);
}else SendClientMessage(playerid,0x9BBDDEAA,"No Admins online");
return 1;
}
you are running the code while looping every player, it needed to be outside the loop.
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)