Advertisement
DovFLaminggo

Admin

Jul 31st, 2014
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.59 KB | None | 0 0
  1. CMD:admins(playerid,params[])
  2. {
  3.     new Count = 0;
  4.     new n[MAX_PLAYER_NAME];
  5.     new string[1000];
  6.     for(new i = 0; i < MAX_PLAYERS; i++)
  7.     {
  8.         if(!IsPlayerConnected(i)) continue;
  9.         if(PlayerInfo[i][Level] < 1) continue;
  10.         GetPlayerName(i,n,sizeof(n));
  11.         format(string,sizeof(string),"{FF0000}%sLevel %d: {C0C0C0}%s {FF00}(%d)  {00FFFF}[%s]{FF0000}\n", string, PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
  12.         Count++;
  13.     }
  14.     if(Count == 0)
  15.     {
  16.         ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "{00FFFF} {33FF33}Online Admin...", "Tidak Ada Admin Yang Online", "ok", "");
  17.         return 1;
  18.     }
  19.     ShowPlayerDialog(playerid, 2,DIALOG_STYLE_MSGBOX, "{00FFFF}  {33FF33}Online Admin...", string, "ok", "");
  20.     return 1;
  21. }
  22. stock GetRankFromLevel(playerid)
  23. {
  24.     new Rank[40];
  25.     switch(PlayerInfo[playerid][Level])
  26.     {
  27.         case 0:
  28.         {
  29.             Rank = "Regular Player";
  30.         }
  31.         case 1:
  32.         {
  33.             Rank = " {C0C0C0}Newbie Administrator";
  34.         }
  35.         case 2:
  36.         {
  37.             Rank = " {C0C0C0}Moderator";
  38.         }
  39.         case 3:
  40.         {
  41.             Rank = " {C0C0C0}Higher Administrator";
  42.         }
  43.         case 4:
  44.         {
  45.             Rank = " {C0C0C0}Profesional Administrator";
  46.         }
  47.         case 5:
  48.         {
  49.             Rank = " {C0C0C0}Elite Administrator";
  50.         }
  51.         case 10:
  52.         {
  53.             Rank = " {C0C0C0}Srv. Co.Owner";
  54.         }
  55.         case 100:
  56.         {
  57.             Rank = " {C0C0C0}Executive Administrator";
  58.         }
  59.     }
  60.     return Rank;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement