Guest User

Untitled

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