Advertisement
Guest User

Aujuda /darvip

a guest
Aug 20th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.32 KB | None | 0 0
  1. SendClientMessage(playerid, COLOR_WHITE, "|______________[ Vips do Server ]______________|");for(new x=0; x<sizeof(VipInfo); x++){if(strcmp(VipInfo[x][vNick],"Ninguem",true) != 0){format(string, sizeof(string), "Vip ID:[%d]: %s Nível:[%d]", x, VipInfo[x][vNick], VipInfo[x][vTipo]);SendClientMessage(playerid, COLOR_AZULBB, string);}}return true;}
  2.  
  3. if(strcmp(cmd, "/resetarobj",true) == 0){if(IsPlayerConnected(playerid)){if (PlayerInfo[playerid][pAdmin] >= 2){
  4. DestroyObject(pRoadCones[playerid]);pRoadCones[playerid] = 0;DestroyObject(PlayerInfo[playerid][pParedao]);PlayerInfo[playerid][pParedao] = 0;DestroyObject(pRoadblock[playerid]);pRoadblock[playerid] = 0;DestroyObject(PlayerInfo[playerid][pBarraca]);PlayerInfo[playerid][pBarraca] = 0;SendClientMessage(playerid, COR_PM,"Você retirou todos os objetos como Barreiras, Bloqueios e etc...");}}return true;}
  5.  
  6. if(strcmp(cmd, "/resetarpcosa",true) == 0)
  7. {
  8. if(IsPlayerConnected(playerid))
  9. {
  10. if (PlayerInfo[playerid][pAdmin] >= 2){DestroyObject(acn);acn = CreateObject(2933, 321.39999389648, -1188.1999511719, 77.099998474121, 0, 359, 37.996215820313);}}return true;}
  11.  
  12.  
  13.     if(strcmp(cmd, "/darvip", true) == 0)
  14.     {
  15.         if(IsPlayerConnected(playerid))
  16.         {
  17.         GetPlayerName(playerid, sendername, 256);
  18.         if (strcmp(sendername,"Ilde_Cooper",true)==0 || strcmp(sendername,"Ilde_Cooper",true)==0 || strcmp(sendername,"Ilde_Cooper",true)==0)
  19.         {
  20.             VipVaga();
  21.             if(VagaSobrando == 0)
  22.             {
  23.                 SendClientMessage(playerid, COLOR_GRAD1, "Não há mais vagas na lista use /limparvip primeiro.");
  24.                 return true;
  25.             }
  26.             tmp = strtok(cmdtext, idx);
  27.             if(!strlen(tmp))
  28.             {
  29.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]");
  30.                 return true;
  31.             }
  32.             new para1;
  33.             new level;
  34.             para1 = ReturnUser(tmp);
  35.             tmp = strtok(cmdtext, idx);
  36.             if(!strlen(tmp))
  37.             {
  38.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]");
  39.                 return true;
  40.             }
  41.             level = strval(tmp);
  42.             GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  43.             GetPlayerName(playerid, sendername, sizeof(sendername));
  44.             if(IsPlayerConnected(para1))
  45.             {
  46.                 if(para1 != INVALID_PLAYER_ID)
  47.                 {
  48.                     format(string, sizeof string, "Você deu VIP Nível %d para %s", level, giveplayer);
  49.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  50.                     format(string, sizeof string, "Você ganhou VIP Nível %d do admin %s", level, sendername);
  51.                     SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  52.                     getdate(year, month, day);
  53.                     gettime(hour,minute,second);
  54.                     format(string, sizeof(string), "%s deu vip ao %s nível %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
  55.                     VipsLog(string);
  56.                     PlayerInfo[para1][pVIP] = level;
  57.                     new var03 = 0;
  58.                     for(new i = 0; i < sizeof(VipInfo); i++)
  59.                     {
  60.                         if(strcmp(giveplayer,VipInfo[i][vNick],true)==0)
  61.                         {
  62.                             VipInfo[i][vTipo] = level;
  63.                             SaveVip();
  64.                             var03 = 1;
  65.                             break;
  66.                         }
  67.                     }
  68.                     if(var03 == 0)
  69.                     {
  70.                         for(new i = 0; i < sizeof(VipInfo); i++)
  71.                         {
  72.                             if(strcmp("Ninguem",VipInfo[i][vNick],true)==0)
  73.                             {
  74.                                 strmid(VipInfo[i][vNick], giveplayer, 0, strlen(giveplayer), 255);
  75.                                 VipInfo[i][vTipo] = level;
  76.                                 SaveVip();
  77.                                 break;
  78.                             }
  79.                         }
  80.                     }
  81.                 }
  82.             }
  83.             }
  84.             else
  85.             {
  86.                 SendClientMessage(playerid, COLOR_GRAD1, "   Você não esta autorizado a usar este comando!");
  87.             }
  88.         }
  89.         return true;
  90.     }
  91.     if (strcmp(cmd, "/limparvip", true) == 0)
  92.     {
  93.         if(PlayerInfo[playerid][pAdmin] < DONO)
  94.         {
  95.             SendClientMessage(playerid, COLOR_GRAD2, "Você não está autorizado a usar este comando!");
  96.             return true;
  97.         }
  98.         tmp = strtok(cmdtext, idx);
  99.         if(!strlen(tmp))
  100.         {
  101.             SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparvip [Vaga]");
  102.             return true;
  103.         }
  104.         new Vagao = strval(tmp);
  105.         if(Vagao < 0 || Vagao > 50) { SendClientMessage(playerid, COLOR_GREY, "Vaga mínima 0 máximo 50!"); return true; }
  106.         if(IsPlayerOnline(VipInfo[Vagao][vNick]))
  107.         {
  108.             new id=GetPlayerID(VipInfo[Vagao][vNick]);
  109.             PlayerInfo[id][pVIP] = 0;
  110.             SendClientMessage(id, COLOR_YELLOW, "Você perdeu seu VIP, renove-o e receba seus benefícios de volta");
  111.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement