Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. public OnPlayerText(playerid, text[]) {
  2. if(FaceReclama(text)) {
  3. Reclama(playerid, text);
  4. return 0;
  5. }
  6. static Text[MAX_PLAYERS][128];
  7. if(Text[playerid][0] != '\0' && !strcmp(text,Text[playerid],true)) return 0;
  8. strcat((Text[playerid][0]='\0', Text[playerid]), text, 128);
  9.  
  10. new string[180];
  11.  
  12. if(PlayerInfo[playerid][pMuted] == 1) {
  13. format(string, sizeof(string), "Nu poti vorbi deoarece ai mute. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
  14. SCM(playerid, COLOR_GREY, string);
  15. return 0;
  16. }
  17. assert(AntiFlood_Check(playerid));
  18. if(TalkingLive[playerid] != 255) {
  19. if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 9) format(string, sizeof(string), "Reporter %s: %s", GetNameEx(playerid), text);
  20. else format(string, sizeof(string), "Jucator %s: %s", GetNameEx(playerid), text);
  21. OOCNews(COLOR_LIGHTGREEN, string);
  22. return 0;
  23. }
  24. if(Mobile[playerid] != 255) {
  25. new idx, tmp[180];
  26. tmp = strtok(text, idx);
  27. format(string, sizeof(string), "%s spune (telefon): %s", GetNameEx(playerid), text);
  28. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  29. if(IsPlayerConnected(Mobile[playerid])) {
  30. if(Mobile[Mobile[playerid]] == playerid) {
  31. if(PlayerInfo[Mobile[playerid]][pSpeaker] == 1) ProxDetector(20.0, Mobile[playerid], string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  32. else SCM(Mobile[playerid], COLOR_YELLOW,string);
  33. }
  34. }
  35. InsertLog(playerid, string, LOG_CHAT);
  36. return 0;
  37. }
  38. if(realchat) {
  39. if(IsPlayerLogged[playerid] == 0) return 0;
  40. if(TutorialActive[playerid] == 1) return 0;
  41. if(InGame[playerid] == 1) {
  42. new name[36];
  43. if(Team[playerid] == 1) name = "{FFA1A1}(Terrorist){FFFFFF}";
  44. else name ="{75AFFF}(Counter-Terrorist){FFFFFF}";
  45. format(string, sizeof(string), "{DE974B}[%s] %s %s: {FFFFFF}%s", ArenaRank(playerid), name, GetNameEx(playerid), text);
  46. SendGameTeam(Team[playerid], -1, string);
  47. }
  48. else {
  49. if(PaintType[playerid] != 0) format(string, sizeof(string), "{5088BF}%s [%d kills]: {FFFFFF}%s", GetNameEx(playerid), PKills[playerid], text);
  50. else format(string, sizeof(string), "%s: {FFFFFF}%s", GetNameEx(playerid), text);
  51. if(PaintType[playerid] != 0) {
  52. SendPaintMessage(PaintType[playerid], -1, string);
  53. return 0;
  54. }
  55. else if(GetPVarInt(playerid, "Cover") == 1) ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
  56. else if(PlayerInfo[playerid][pColor] >= 1) {
  57. format(string, sizeof(string), "{%s}%s: {FFFFFF}%s", serverColors(PlayerInfo[playerid][pColor]), GetNameEx(playerid), text);
  58. ProxDetector(20.0, playerid, string,-1,-1,-1,-1,-1);
  59. }
  60. else if(PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pAdmin] >= 1) ProxDetector(20.0, playerid, string,0xBA0404FF,0xBA0404FF,0xBA0404FF,0xBA0404FF,0xBA0404FF);
  61. else if(PlayerInfo[playerid][pYT] >= 1) ProxDetector(20.0, playerid, string,0x388BFFFF,0x388BFFFF,0x388BFFFF,0x388BFFFF,0x388BFFFF);
  62. else ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
  63. }
  64. format(string, sizeof(string), "(chat) %s", text);
  65. ChatLog(GetName(playerid), playerid, string);
  66.  
  67. format(string, sizeof(string), "\"%s\"", text);
  68. SetPlayerChatBubble(playerid, text, COLOR_CHATBUBBLE, 10.0, 10000);
  69. return 0;
  70. }
  71. return 1;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement