SA-MP Forums Archive
Help To Convert this: - 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: Help To Convert this: (/showthread.php?tid=253160)



Help To Convert this: - Alex_Obando - 05.05.2011

Can I convert this to:

pawn Код:
if (adminlevel[playerid] >= 1)
if (adminlevel[playerid] >= 2)
if (adminlevel[playerid] >= 3)
if (adminlevel[playerid] >= 4)
if (adminlevel[playerid] >= 5)
pawn Код:
if (strcmp(cmd, "/admins online", true) == 0 || strcmp(cmd, "/admins", true) == 0)
    {
    if(IsPlayerConnected(playerid))
      {
            SendClientMessage(playerid, COLOR_GRAD1, "Administrators Online:");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                  new blablabla=0;
                  if(PlayerInfo[playerid][pAdmin] >= 2000)
                  {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "Head Admin: %s", sendername);
                        SendClientMessage(playerid, COLOR_RED, string);
                        blablabla++;
                    }
                  else if(PlayerInfo[playerid][pAdmin] >= 1000 && PlayerInfo[playerid][pAdmin] < 2000)
                  {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "Vice Admin: %s", sendername);
                        SendClientMessage(playerid, COLOR_PINKER, string);
                        blablabla++;
                    }
                  else if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdmin] < 1000)
                  {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "Admin: %s", sendername);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        blablabla++;
                    }
                  else if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] < 2)
                  {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "Admin Prуbny: %s", sendername);
                        SendClientMessage(playerid, COLOR_YELLOW, string);
                        blablabla++;
                    }
                }
            }
        }
        return 1;
    }



Respuesta: Help To Convert this: - Alex_Obando - 05.05.2011

#Bump


Re: Help To Convert this: - farmer1710 - 05.05.2011

Dont Understand what your asking?


Re: Help To Convert this: - TheGarfield - 05.05.2011

http://forum.sa-mp.com/showpost.php?...5&postcount=11

get my code.


Respuesta: Help To Convert this: - Alex_Obando - 05.05.2011

I get that /admins, but instead of "Pinfo" I need it to be adminlevel > 1 /2/3/4/5.