Guest User

Untitled

a guest
Feb 19th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.55 KB | None | 0 0
  1. //----------------------------------[GOTO]-----------------------------------------------
  2.     if(strcmp(cmd, "/particularhelper", true) == 0 || strcmp(cmd, "/parh", true) == 0)
  3.     {
  4.         if(PlayerInfo[playerid][pMuted] == 1)
  5.         {
  6.             SendClientMessage(playerid, TEAM_CYAN_COLOR, "Você não pode falar, pois foi calado");
  7.             return 1;
  8.         }
  9.         if(IsPlayerConnected(playerid))
  10.         {
  11.             if(PlayerInfo[playerid][pHelper] < 1)
  12.             {
  13.                 SendClientMessage(playerid, COLOR_GREY, "Voce não é um helper!");
  14.                 return 1;
  15.             }
  16.             //if(helpertrabalhando[playerid] < 1)
  17.             //{
  18.             //  SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  19.             //  return 1;
  20.             //}
  21.             tmp = strtok(cmdtext, idx);
  22.             if(!strlen(tmp))
  23.             {
  24.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [id] [texto]");
  25.                 return 1;
  26.             }
  27.             giveplayerid = ReturnUser(tmp);
  28.             if(PlayerInfo[giveplayerid][pHelper] < 1)
  29.             {
  30.                 SendClientMessage(playerid, COLOR_GREY, "Voce não é um admin ou o player que você digitou não é helper!");
  31.                 return 1;
  32.             }
  33.             if (IsPlayerConnected(giveplayerid))
  34.             {
  35.                 if(giveplayerid != INVALID_PLAYER_ID)
  36.                 {
  37.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  38.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  39.                     new length = strlen(cmdtext);
  40.                     while ((idx < length) && (cmdtext[idx] <= ' '))
  41.                     {
  42.                         idx++;
  43.                     }
  44.                     new offset = idx;
  45.                     new result[64];
  46.                     while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  47.                     {
  48.                         result[idx - offset] = cmdtext[idx];
  49.                         idx++;
  50.                     }
  51.                     result[idx - offset] = EOS;
  52.                     if(!strlen(result))
  53.                     {
  54.                         SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [id] [texto]");
  55.                         return 1;
  56.                     }
  57.                     if(helpertrabalhando[playerid] == 1)
  58.                     {
  59.                         format(string, sizeof(string), "%s(ID: %d) particular: %s", sendername, playerid, (result));
  60.                         SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  61.                     }
  62.                     print(string);
  63.                     format(string, sizeof(string), "PM enviada para %s(ID: %d).", giveplayer, giveplayerid);
  64.                     SendClientMessage(playerid,  COLOR_YELLOW, string);
  65.                     format(string, sizeof(string), "[%d/%d/%d] [%d:%d:%d] PM: %s para %s: %s.", v[2], v[1], v[0], v[3], v[4], v[5] , PlayerName(playerid), PlayerName(giveplayerid), (result));
  66.                     AChatLog(string);
  67.                     return 1;
  68.                 }
  69.             }
  70.             else
  71.             {
  72.                     SendClientMessage(playerid, COLOR_GRAD1, "   Esse jogador está off-line.");
  73.             }
  74.         }
  75.         return 1;
  76.     }
Add Comment
Please, Sign In to add comment