SA-MP Forums Archive
bug hunt - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: bug hunt (/showthread.php?tid=137071)



bug hunt - 02manchestera - 27.03.2010

Im tring to find a bug with my admin system but cant find it any where, what it is doing is showing players that are admin when they are not but they do not have the cmds so i was wondering if there is anything wrong with this(the cmd to show onlineadmins.

Код:
if (strcmp(cmd, "/admins", true) == 0) {
    new count = 0;
    SendClientMessage(playerid, GREEN, "______________________________________");
    SendClientMessage(playerid, GREEN, "            [Online Admins]");
    for(new i = 0; i < MAX_PLAYERS; i++) {
      if (IsPlayerConnected(i)) {
        if(adminlevel[i] >= 1 && adminlevel[i] <= 5 && Hide[i] == 0) {
          GetPlayerName(i, sendername, sizeof(sendername));
          format(string, 128, "Level %d [%i]%s", adminlevel[i],i,sendername);
          SendClientMessage(playerid, LIGHTGREEN, string);
          count++;
        }
      }
    }
    if (count == 0) SendClientMessage(playerid,RED,"No Admins Online");
    SendClientMessage(playerid, GREEN, "______________________________________");
    return 1;
  }



Re: bug hunt - Steven82 - 27.03.2010

Did you make that is that a GF edited one?


Re: bug hunt - 02manchestera - 27.03.2010

i didnt make it a friend did etch dont no if he did or not.