toribio

toribio

Oct 4th, 2009
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. if(!strcmp(cmd, "/darvip", true))
  2. {
  3.     if(PlayerInfo[playerid][pAdmin] >= 1337) //apenas admins level 1337 podem dar vip
  4.     {
  5.         tmp = strtok(cmdtext, idx);
  6.         if(!strlen(tmp))
  7.         {
  8.             SendClientMessage(playerid, COLOR_GRAD1, "USE: /darvip [playerid/ParteDoNome]");
  9.             return 1;
  10.         }
  11.         giveplayerid = ReturnUser(tmp);
  12.         if(PlayerInfo[giveplayerid][pDonateRank] < 1)
  13.         {
  14.             PlayerInfo[giveplayerid][pDonateRank] = 1;
  15.             new giveplayername[MAX_PLAYERS_NAME], playername1[MAX_PLAYER_NAME];
  16.             GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  17.             GetPlayerName(playerid, playername1, sizeof(playername1));
  18.             format(string, sizeof string, "Você deu VIP para %s", giveplayername);
  19.             SendClientMessage(playerid, COLOR_GRAD1, string);
  20.             format(string, sizeof string, "Você ganhou VIP do admin %s", playername1);
  21.             SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  22.         } else {
  23.             SendClientMessage(playerid, COLOR_RED, "Este jogador já é VIP!");
  24.         }
  25.     } else {
  26.         SendClientMessage(playerid, COLOR_RED, "Você não tem privilégios suficiente para utilizar esse comando!");
  27.     }
  28.     return 1;
  29. }
Add Comment
Please, Sign In to add comment