SA-MP Forums Archive
/admins - 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)
+--- Thread: /admins (/showthread.php?tid=497790)



/admins - AwokenNeoX - 28.02.2014

Can someone create my a /tps list but with DIALOG_BOX ?


Its very easy Admins are Level 3 or higher (/admins)

And Level 2 = Trusted Player

So I want /tps only for Level 2 Player he shows all Online Trusted Players

with this

Код:
if(AccInfo[i][Level] = 2
Please help me I cant do it I will give you rep+ and will be very happy if it works


Re: /admins - M3HR4N - 28.02.2014

you mean this ?
pawn Код:
CMD:tps(playerid, params[])
{
       new count = 0, string[256];
       for(new i = 0; i < MAX_PLAYERS; i ++)
       {
          if(IsPlayerConnected(i))
          {
              if(AccInfo[i][Level] == 2)
              {

                 new nameee[128];
                 GetPlayerName(i, nameee, 16);
                 format(string, sizeof(string),"[%d]%s", i, PlayerName2(i));
                 ShowPlayerDialog(playerid, 139, DIALOG_STYLE_MSGBOX, "Trusted Players", string, "Ok", "");
                 count++;
              }
          }
       }
       if(count == 0)
       {
              ShowPlayerDialog(playerid, 139, DIALOG_STYLE_MSGBOX, "Trusted Players", "No Trusted Player Online.", "Ok", "");
    }
  return 1;
}