Advertisement
Guest User

Untitled

a guest
May 25th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.43 KB | None | 0 0
  1. YCMD:report(playerid, params[], help) {
  2. if(PlayerInfo[playerid][pReportTime] >= 1) {
  3. new string[128];
  4. format(string, sizeof(string), "Vei putea da un report peste %d minute (%d secunde).", PlayerInfo[playerid][pReportTime]/60, PlayerInfo[playerid][pReportTime]);
  5. SCM(playerid, COLOR_GRAD4, string);
  6. return 1;
  7. }
  8. if(PlayerInfo[playerid][pAdmin] >= 1 && GetPVarInt(playerid, "Cover") == 0) return SCM(playerid, COLOR_GREY, "Nu poti da un report deoarece esti admin!");
  9. if(PlayerInfo[playerid][pLevel] < 5) SCM(playerid, COLOR_LGREEN, "Nu da report pentru motive inutile deoarece vei fi sanctionat!");
  10. ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
  11. return 1; }
  12.  
  13. function CheckReport(playerid) {
  14. if(Ajutor[playerid] == 1) {
  15. SCM(playerid, COLOR_YELLOW, "Report-ul tau a fost inchis automat deoarece nu ai primit un raspuns.");
  16. Ajutor[playerid] = 0;
  17. ReportedPlayer[playerid] = -1;
  18. SetPVarInt(playerid, "Reported", 0);
  19. SetPVarInt(playerid, "ReportType", 0);
  20. SetPVarString(playerid, "ReportedBy", "");
  21. SetPVarInt(playerid, "ReportScore", 0);
  22. SetPVarString(playerid, "ReportText", "");
  23. if(ReportTimer[playerid] != 0) ReportTimer[playerid] = 0;
  24. }
  25. return 1; }
  26.  
  27. case DIALOG_REPORT: {
  28. if(!response) return 1;
  29. SetPVarInt(playerid, "Selected", listitem);
  30. switch(listitem) {
  31. case 0: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Raporteaza DM", "Scrie ID-ul sau numele jucatorului pe care vrei sa-l raportezi:", "Next", "Back");
  32. case 1: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Raporteaza un codat", "Scrie ID-ul sau numele jucatorului pe care vrei sa-l raportezi:", "Next", "Back");
  33. case 2: {
  34. ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Intrebari despre donatii",
  35. "Cum donez?\nPentru a dona, trebuie sa iei legatura cu ownerii serverului", "Close", "");
  36. }
  37. case 3: {
  38. format(string, sizeof(string), "%s (%d) este blocat.", GetName(playerid), playerid);
  39. SendAdminMessage(0xC9161FFF, string, 1);
  40. if(ReportTimer[playerid] != 0) {
  41. KillTimer(ReportTimer[playerid]);
  42. ReportTimer[playerid] = 0;
  43. }
  44.  
  45. ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
  46. SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
  47. PlayerInfo[playerid][pReportTime] = 120;
  48. SetPVarInt(playerid, "Reported", 1);
  49. SetPVarInt(playerid, "ReportType", 3);
  50. }
  51. case 4: {
  52. format(string, sizeof(string), "%s (%d) doreste sa faca o afacere.", GetName(playerid), playerid);
  53. SendAdminMessage(0xC9161FFF, string, 1);
  54. if(ReportTimer[playerid] != 0) {
  55. KillTimer(ReportTimer[playerid]);
  56. ReportTimer[playerid] = 0;
  57. }
  58.  
  59. ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
  60. SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
  61. PlayerInfo[playerid][pReportTime] = 120;
  62. SetPVarInt(playerid, "Reported", 1);
  63. SetPVarInt(playerid, "ReportType", 4);
  64. }
  65. case 5: {
  66. format(string, sizeof(string), "%s (%d) a cerut un respawn.", GetName(playerid), playerid);
  67. SendAdminMessage(0xC9161FFF, string, 1);
  68. if(ReportTimer[playerid] != 0) {
  69. KillTimer(ReportTimer[playerid]);
  70. ReportTimer[playerid] = 0;
  71. }
  72.  
  73. ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
  74. SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
  75. PlayerInfo[playerid][pReportTime] = 120;
  76. SetPVarInt(playerid, "Reported", 1);
  77. SetPVarInt(playerid, "ReportType", 5);
  78. }
  79. case 6: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Alta problema", "Scrie problema pe care o ai.\nNu folosi comanda /report aiurea deoarece vei fi sanctionat.", "Ok", "Back");
  80. }
  81. }
  82.  
  83. case DIALOG_REPORT+1: {
  84. if(!response) return ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
  85. new type = GetPVarInt(playerid, "Selected"), id = strval(inputtext);
  86.  
  87. if(type != 4) {
  88. if(sscanf(inputtext, "u", id)) {
  89. ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
  90. SCM(playerid, COLOR_GRAD3, "ID Invalid!");
  91. return 1;
  92. }
  93. if(id == playerid) {
  94. ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
  95. SCM(playerid, COLOR_GRAD4, "Nu te poti adauga pe tine in lista!");
  96. return 1;
  97. }
  98. if(!IsPlayerConnected(id)) {
  99. ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
  100. SCM(playerid, COLOR_GRAD4, "Acel player nu este online!");
  101. return 1;
  102. }
  103. }
  104.  
  105. switch(type) {
  106. case 0: {
  107. format(string, sizeof(string), "%s (%d) l-a raportat pe %s (%d) pentru DM.", GetName(playerid), playerid, GetName(id), id);
  108. SendAdminMessage(0xC9161FFF, string, 1);
  109. SetPVarInt(id, "Reported", 1);
  110. SetPVarInt(id, "ReportType", 1);
  111. SetPVarString(id, "ReportedBy", GetName(playerid));
  112. SetPVarInt(id, "ReportScore", GetPVarInt(id, "ReportScore")+1);
  113. }
  114. case 1: {
  115. format(string, sizeof(string), "%s (%d) l-a raportat pe %s (%d) pentru cheats.", GetName(playerid), playerid, GetName(id), id);
  116. SendAdminMessage(0xC9161FFF, string, 1);
  117. SetPVarInt(id, "Reported", 1);
  118. SetPVarInt(id, "ReportType", 2);
  119. SetPVarString(id, "ReportedBy", GetName(playerid));
  120. SetPVarInt(id, "ReportScore", GetPVarInt(id, "ReportScore")+1);
  121. }
  122. case 6: {
  123. if(CuvinteCheie(inputtext)) {
  124. new time = 2;
  125. PlayerInfo[playerid][pReportTime] += time*60;
  126. Update(playerid, pReportTimex);
  127. format(string, sizeof(string), "Ai primit mute pe /report pentru %d minute! Motiv: Report aiurea.", time);
  128. SCM(playerid, -1, string);
  129. format(string, sizeof(string), "AdmBot: %s a primit mute %d minute pe /report de la AdmBot, motiv: Report aiurea.", GetName(playerid), time);
  130. SCMTA(COLOR_LIGHTRED, string);
  131. return 1;
  132. }
  133. else {
  134. format(string, sizeof(string), "Report de la %s (ID: %d, lvl: %d): %s.", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], inputtext);
  135. SendAdminMessage(0xC9161FFF, string, 1);
  136. SetPVarInt(playerid, "Reported", 1);
  137. SetPVarInt(playerid, "ReportType", 6);
  138. SetPVarString(playerid, "ReportText", inputtext);
  139. }
  140. }
  141. }
  142. if(ReportTimer[playerid] != 0) {
  143. KillTimer(ReportTimer[playerid]);
  144. ReportTimer[playerid] = 0;
  145. }
  146.  
  147. PlayerInfo[playerid][pReportTime] = 120;
  148. Ajutor[playerid] = 1;
  149. ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
  150. SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
  151. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement