reportsystem.pwn 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Report System
  11. Next Generation Gaming, LLC
  12. (created by Next Generation Gaming Development Team)
  13. * Copyright (c) 2016, Next Generation Gaming, LLC
  14. *
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without modification,
  18. * are not permitted in any case.
  19. *
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  25. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. forward ReplyTimer(reportid);
  34. public ReplyTimer(reportid)
  35. {
  36. Reports[reportid][ReportPriority] = 0;
  37. Reports[reportid][ReportLevel] = 0;
  38. Reports[reportid][BeingUsed] = 0;
  39. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  40. Reports[reportid][CheckingReport] = INVALID_PLAYER_ID;
  41. }
  42. stock SendReportToQue(reportfrom, report[], reportlevel, reportpriority)
  43. {
  44. new newid = INVALID_REPORT_ID, string[128];
  45. for(new i; i < MAX_REPORTS; ++i)
  46. {
  47. if(Reports[i][HasBeenUsed] == 0)
  48. {
  49. newid = i;
  50. break;
  51. }
  52. }
  53. if(newid != INVALID_REPORT_ID)
  54. {
  55. switch(reportpriority)
  56. {
  57. case 1:
  58. {
  59. foreach(new i: Player)
  60. {
  61. if(PlayerInfo[i][pAdmin] >= 2 && PlayerInfo[i][pTogReports] == 0)
  62. {
  63. GameTextForPlayer(i, "~r~DM Alert", 1500, 1);
  64. }
  65. }
  66. }
  67. case 2:
  68. {
  69. foreach(new i: Player)
  70. {
  71. if(PlayerInfo[i][pAdmin] >= reportlevel && PlayerInfo[i][pTogReports] == 0)
  72. {
  73. GameTextForPlayer(i, "~p~Priority Report", 1500, 1);
  74. }
  75. }
  76. }
  77. case 3..4:
  78. {
  79. foreach(new i: Player)
  80. {
  81. if(PlayerInfo[i][pAdmin] >= reportlevel && PlayerInfo[i][pTogReports] == 0)
  82. {
  83. TextDrawSetString(PriorityReport[i], "~y~New Report");
  84. TextDrawShowForPlayer(i, PriorityReport[i]);
  85. SetTimerEx("HideReportText", 2000, 0, "d", i);
  86. }
  87. }
  88. }
  89. case 5:
  90. {
  91. foreach(new i: Player)
  92. {
  93. if(PlayerInfo[i][pAdmin] >= reportlevel && PlayerInfo[i][pTogReports] == 0)
  94. {
  95. //GameTextForPlayer(i, "~w~~n~n~n~Priority 5 Item Pending", 1500, 3);
  96. TextDrawSetString(PriorityReport[i], "~w~Priority 5 Item Pending");
  97. TextDrawShowForPlayer(i, PriorityReport[i]);
  98. SetTimerEx("HideReportText", 2000, 0, "d", i);
  99. }
  100. }
  101. }
  102. }
  103. foreach(new i: Player)
  104. {
  105. if(PlayerInfo[i][pAdmin] >= 2 && PlayerInfo[i][pTogReports] == 0 && !GetPVarType(i, "TogReports")) {
  106. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: 0 mins | Pr: %i", GetPlayerNameEx(reportfrom), reportfrom, newid, report, reportpriority);
  107. SendClientMessageEx(i, COLOR_REPORT, string);
  108. }
  109. else if((reportpriority == 1 || reportpriority == 2) && PlayerInfo[i][pTogReports] == 0 && GetPVarType(i, "TogReports")) {
  110. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: 0 mins | Pr: %i", GetPlayerNameEx(reportfrom), reportfrom, newid, report, reportpriority);
  111. SendClientMessageEx(i, COLOR_REPORT, string);
  112. }
  113. }
  114. SetPVarInt(reportfrom, "HasReport", 1);
  115. format(string, sizeof(string), "%s | SQLID: %i | RID: %i | Report: %s | Pr: %i", GetPlayerNameEx(reportfrom), GetPlayerSQLId(reportfrom), newid, report, reportpriority);
  116. Log("logs/report.log", string);
  117. if(reportlevel == 2)
  118. {
  119. strmid(Reports[newid][Report], report, 0, strlen(report), 128);
  120. Reports[newid][ReportFrom] = reportfrom;
  121. Reports[newid][TimeToExpire] = 0;
  122. Reports[newid][HasBeenUsed] = 1;
  123. Reports[newid][BeingUsed] = 1;
  124. Reports[newid][ReportPriority] = reportpriority;
  125. Reports[newid][ReportExpireTimer] = SetTimerEx("ReportTimer", 60000, 0, "d", newid);
  126. }
  127. else
  128. {
  129. strmid(Reports[newid][Report], report, 0, strlen(report), 128);
  130. Reports[newid][ReportFrom] = reportfrom;
  131. Reports[newid][TimeToExpire] = 0;
  132. Reports[newid][HasBeenUsed] = 1;
  133. Reports[newid][BeingUsed] = 1;
  134. Reports[newid][ReportPriority] = reportpriority;
  135. Reports[newid][ReportExpireTimer] = SetTimerEx("ReportTimer", 60000, 0, "d", newid);
  136. }
  137. }
  138. else
  139. {
  140. ClearReports();
  141. SendReportToQue(reportfrom, report, reportlevel, reportpriority);
  142. }
  143. }
  144. stock ClearReports()
  145. {
  146. for(new i=0;i<MAX_REPORTS;i++)
  147. {
  148. if(Reports[i][BeingUsed] == 1) {
  149. DeletePVar(Reports[i][ReportFrom], "HasReport");
  150. }
  151. if(GetPVarInt(Reports[i][ReportFrom], "AlertedThisPlayer"))
  152. {
  153. DeletePVar(Reports[i][ReportFrom], "AlertedThisPlayer");
  154. DeletePVar(Reports[i][ReportFrom], "AlertType");
  155. if(AlertTime[Reports[i][ReportFrom]] != 0) AlertTime[Reports[i][ReportFrom]] = 0;
  156. }
  157. strmid(Reports[i][Report], "None", 0, 4, 4);
  158. Reports[i][CheckingReport] = INVALID_PLAYER_ID;
  159. Reports[i][ReportFrom] = INVALID_PLAYER_ID;
  160. Reports[i][TimeToExpire] = 0;
  161. Reports[i][HasBeenUsed] = 0;
  162. Reports[i][BeingUsed] = 0;
  163. Reports[i][ReportPriority] = 0;
  164. Reports[i][ReportLevel] = 0;
  165. }
  166. return 1;
  167. }
  168. forward ReportTimer(reportid);
  169. public ReportTimer(reportid)
  170. {
  171. if(Reports[reportid][BeingUsed] == 1)
  172. {
  173. if(Reports[reportid][TimeToExpire] >= 0)
  174. {
  175. Reports[reportid][TimeToExpire]++;
  176. Reports[reportid][ReportExpireTimer] = SetTimerEx("ReportTimer", 60000, 0, "d", reportid);
  177. }
  178. }
  179. return 1;
  180. }
  181. CMD:clearallreports(playerid, params[])
  182. {
  183. if (PlayerInfo[playerid][pAdmin] >= 1337) {
  184. new string[128];
  185. ClearReports();
  186. SendClientMessageEx(playerid,COLOR_GRAD1, "You have cleared all the active reports.");
  187. format(string, sizeof(string), "AdmCmd: %s has cleared all the pending reports.", GetPlayerNameEx(playerid));
  188. ABroadCast(COLOR_LIGHTRED, string, 2);
  189. }
  190. else {
  191. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  192. }
  193. return 1;
  194. }
  195. CMD:checkreportcount(playerid, params[])
  196. {
  197. if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pASM] >= 1)
  198. {
  199. new string[128], adminname[MAX_PLAYER_NAME], tdate[11];
  200. if(sscanf(params, "s[24]s[11]", adminname, tdate)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /checkreportcount [admin name] [date (YYYY-MM-DD)]");
  201. new giveplayerid = ReturnUser(adminname);
  202. if(IsPlayerConnected(giveplayerid) && PlayerInfo[giveplayerid][pAdmin] >= 2)
  203. {
  204. mysql_format(MainPipeline, string, sizeof(string), "SELECT SUM(count) FROM `tokens_report` WHERE `playerid` = %d AND `date` = '%s'", GetPlayerSQLId(giveplayerid), tdate);
  205. mysql_tquery(MainPipeline, string, "QueryCheckCountFinish", "issi", playerid, GetPlayerNameEx(giveplayerid), tdate, 0);
  206. mysql_format(MainPipeline, string, sizeof(string), "SELECT `count`, `hour` FROM `tokens_report` WHERE `playerid` = %d AND `date` = '%s' ORDER BY `hour` ASC", GetPlayerSQLId(giveplayerid), tdate);
  207. mysql_tquery(MainPipeline, string, "QueryCheckCountFinish", "issi", playerid, GetPlayerNameEx(giveplayerid), tdate, 1);
  208. }
  209. else
  210. {
  211. new tmpName[MAX_PLAYER_NAME];
  212. mysql_escape_string(adminname, tmpName);
  213. mysql_format(MainPipeline, string, sizeof(string), "SELECT `id`, `Username` FROM `accounts` WHERE `Username` = '%s'", tmpName);
  214. mysql_tquery(MainPipeline, string, "QueryUsernameCheck", "isi", playerid, tdate, 0);
  215. }
  216. }
  217. return 1;
  218. }
  219. CMD:togchatreports(playerid, params[])
  220. {
  221. if(PlayerInfo[playerid][pAdmin] >= 2) {
  222. if(GetPVarType(playerid, "TogReports")) {
  223. DeletePVar(playerid, "TogReports");
  224. SendClientMessageEx(playerid, COLOR_WHITE, "You will now see all reports.");
  225. }
  226. else {
  227. SetPVarInt(playerid, "TogReports", 1);
  228. SendClientMessageEx(playerid, COLOR_WHITE, "You will now see priority reports only.");
  229. }
  230. }
  231. return 1;
  232. }
  233. CMD:togreports(playerid, params[])
  234. {
  235. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pUndercover] >= 1)
  236. {
  237. switch(PlayerInfo[playerid][pTogReports])
  238. {
  239. case 0:
  240. {
  241. PlayerInfo[playerid][pTogReports] = 1;
  242. SendClientMessageEx(playerid, COLOR_WHITE, "You have went into spec ops mode, you will be unable to see admin messages.");
  243. }
  244. case 1:
  245. {
  246. PlayerInfo[playerid][pTogReports] = 0;
  247. SendClientMessageEx(playerid, COLOR_WHITE, "You are now out of spec ops mode, you will be able to see admin messages.");
  248. }
  249. }
  250. }
  251. else
  252. {
  253. SendClientMessageEx(playerid, COLOR_GRAD2, "You aren't authorized to use this command.");
  254. }
  255. return 1;
  256. }
  257. CMD:reporttips(playerid, params[])
  258. {
  259. ShowPlayerDialogEx(playerid,7955,DIALOG_STYLE_MSGBOX,"Report tips","Tips when reporting:\n- Report what you need, not who you need.\n- Be specific, report exactly what you need.\n- Do not make false reports.\n- Do not flame admins.\n- Report only for in-game items.\n- For shop orders use the /shoporder command","Close", "");
  260. return 1;
  261. }
  262. CMD:reply(playerid, params[])
  263. {
  264. new string[128];
  265. new reportid = INVALID_REPORT_ID;
  266. for(new i = 0; i < MAX_REPORTS; i++)
  267. {
  268. if(Reports[i][ReportFrom] == playerid && Reports[i][CheckingReport] != INVALID_PLAYER_ID)
  269. {
  270. reportid = i;
  271. }
  272. }
  273. if(reportid == INVALID_REPORT_ID)
  274. {
  275. SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have any reports being reviewed at the moment.");
  276. return 1;
  277. }
  278. if (IsPlayerConnected(Reports[reportid][CheckingReport]))
  279. {
  280. format(string, sizeof(string), "%s(ID: %d) replies: %s", GetPlayerNameEx(playerid), playerid, params);
  281. SendClientMessageEx(Reports[reportid][CheckingReport], COLOR_YELLOW, string);
  282. format(string, sizeof(string), "Reply sent to %s: %s", GetPlayerNameEx(Reports[reportid][CheckingReport]), params);
  283. SendClientMessageEx(playerid, COLOR_YELLOW, string);
  284. }
  285. else SendClientMessageEx(playerid, COLOR_GRAD1, "Player not connected.");
  286. return 1;
  287. }
  288. CMD:rmute(playerid, params[])
  289. {
  290. if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pAP] >= 2 || PlayerInfo[playerid][pHR] >= 3)
  291. {
  292. new string[128], giveplayerid;
  293. if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /rmute [player]");
  294. if(PlayerInfo[giveplayerid][pAdmin] > 1) return SendClientMessageEx(playerid, COLOR_GREY, "You can't report mute an Admin.");
  295. if(IsPlayerConnected(giveplayerid))
  296. {
  297. if(PlayerInfo[giveplayerid][pRMuted] == 0)
  298. {
  299. PlayerInfo[giveplayerid][pRMuted] = 1;
  300. format(string, sizeof(string), "AdmCmd: %s has indefinitely blocked %s from submitting reports.",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  301. ABroadCast(COLOR_LIGHTRED,string,2);
  302. format(string, sizeof(string), "You have been blocked from submitting /reports by %s.", GetPlayerNameEx(playerid));
  303. SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
  304. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "You will not be able to submit reports until you are unblocked. To appeal this action contact hr@ng-gaming.net.");
  305. format(string, sizeof(string), "AdmCmd: %s(%d) was blocked from /report by %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid));
  306. Log("logs/mute.log", string);
  307. }
  308. else
  309. {
  310. PlayerInfo[giveplayerid][pRMuted] = 0;
  311. format(string, sizeof(string), "AdmCmd: %s has been re-allowed to submit reports by %s",GetPlayerNameEx(giveplayerid),GetPlayerNameEx(playerid));
  312. ABroadCast(COLOR_LIGHTRED,string,2);
  313. format(string, sizeof(string), "You have been re-allowed to submitting /reports again by %s.", GetPlayerNameEx(playerid));
  314. SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
  315. format(string, sizeof(string), "AdmCmd: %s(%d) was unblocked from /report by %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid));
  316. Log("logs/mute.log", string);
  317. }
  318. }
  319. }
  320. else
  321. {
  322. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  323. }
  324. return 1;
  325. }
  326. CMD:rto(playerid, params[])
  327. {
  328. if (PlayerInfo[playerid][pAdmin] >= 3)
  329. {
  330. new string[512], giveplayerid, reason[64];
  331. if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /rto [player] [reason]");
  332. if(PlayerInfo[giveplayerid][pAdmin] > 1) return SendClientMessageEx(playerid, COLOR_GREY, "You can't report mute an Admin.");
  333. if(IsPlayerConnected(giveplayerid))
  334. {
  335. if(PlayerInfo[giveplayerid][pRMuted] == 0)
  336. {
  337. if(PlayerInfo[giveplayerid][pRMutedTotal] == 0)
  338. {
  339. PlayerInfo[giveplayerid][pRMutedTotal] = 1;
  340. format(string, sizeof(string), "AdmCmd: %s has given %s their first warning about report abuse, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  341. ABroadCast(COLOR_LIGHTRED,string,2);
  342. format(string, sizeof(string), "An admin warns you not to abuse /report.\n\nNote that future abuse of /report could result in a mute from /report or loss of that privilege altogether.");
  343. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Report abuse warning", string,"Next", "");
  344. format(string, sizeof(string), "AdmCmd: %s has given %s(%d) their first warning about report abuse, reason: %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), reason);
  345. Log("logs/mute.log", string);
  346. }
  347. else if(PlayerInfo[giveplayerid][pRMutedTotal] == 1)
  348. {
  349. PlayerInfo[giveplayerid][pRMuted] = 2;
  350. PlayerInfo[giveplayerid][pRMutedTotal] = 2;
  351. PlayerInfo[giveplayerid][pRMutedTime] = 15*60;
  352. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from submitting reports, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  353. ABroadCast(COLOR_LIGHTRED,string,2);
  354. format(string, sizeof(string), "You have been temporarily blocked from submitting reports by %s, reason: %s.\n\nAs this is the second time you have been blocked from reporting, you will not be able to use /report for 15 minutes.\n\nNote that future abuse of /report could result in a longer mute from /report or loss of that privilege altogether.", GetPlayerNameEx(playerid), reason);
  355. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Temporarily blocked from reports", string,"Next", "");
  356. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  357. Log("logs/mute.log", string);
  358. }
  359. else if(PlayerInfo[giveplayerid][pRMutedTotal] == 2)
  360. {
  361. PlayerInfo[giveplayerid][pRMuted] = 2;
  362. PlayerInfo[giveplayerid][pRMutedTotal] = 3;
  363. PlayerInfo[giveplayerid][pRMutedTime] = 30*60;
  364. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from submitting reports, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  365. ABroadCast(COLOR_LIGHTRED,string,2);
  366. format(string, sizeof(string), "You have been temporarily blocked from submitting reports by %s, reason: %s.\n\nAs this is the third time you have been blocked from reporting, you will not be able to use /report for 30 minutes.\n\nNote that future abuse of /report could result in a longer mute from /report or loss of that privilege altogether.", GetPlayerNameEx(playerid), reason);
  367. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Temporarily blocked from reports", string,"Next", "");
  368. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  369. Log("logs/mute.log", string);
  370. }
  371. else if(PlayerInfo[giveplayerid][pRMutedTotal] == 3)
  372. {
  373. PlayerInfo[giveplayerid][pRMuted] = 2;
  374. PlayerInfo[giveplayerid][pRMutedTotal] = 4;
  375. PlayerInfo[giveplayerid][pRMutedTime] = 45*60;
  376. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from submitting reports, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  377. ABroadCast(COLOR_LIGHTRED,string,2);
  378. format(string, sizeof(string), "You have been temporarily blocked from submitting reports by %s, reason: %s.\n\nAs this is the fourth time you have been blocked from reporting, you will not be able to use /report for 45 minutes.\n\nNote that future abuse of /report could result in a longer mute from /report or loss of that privilege altogether.", GetPlayerNameEx(playerid), reason);
  379. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Temporarily blocked from reports", string,"Next", "");
  380. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  381. Log("logs/mute.log", string);
  382. }
  383. else if(PlayerInfo[giveplayerid][pRMutedTotal] == 4)
  384. {
  385. PlayerInfo[giveplayerid][pRMuted] = 2;
  386. PlayerInfo[giveplayerid][pRMutedTotal] = 5;
  387. PlayerInfo[giveplayerid][pRMutedTime] = 60*60;
  388. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from submitting reports, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  389. ABroadCast(COLOR_LIGHTRED,string,2);
  390. format(string, sizeof(string), "You have been temporarily blocked from submitting reports by %s, reason: %s.\n\nAs this is the fifth time you have been blocked from reporting, you will not be able to use /report for 60 minutes.\n\nNote that future abuse of /report could result in a loss of that privilege altogether.", GetPlayerNameEx(playerid), reason);
  391. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Temporarily blocked from reports", string,"Next", "");
  392. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  393. Log("logs/mute.log", string);
  394. }
  395. else if(PlayerInfo[giveplayerid][pRMutedTotal] >= 5)
  396. {
  397. PlayerInfo[giveplayerid][pRMuted] = 2;
  398. PlayerInfo[giveplayerid][pRMutedTotal] = 6;
  399. PlayerInfo[giveplayerid][pRMutedTime] = 300*60;
  400. format(string, sizeof(string), "AdmCmd: %s has temporarily blocked %s from submitting reports, reason: %s",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), reason);
  401. ABroadCast(COLOR_LIGHTRED,string,2);
  402. format(string, sizeof(string), "You have been temporarily blocked from submitting reports by %s, reason: %s.\n\nAs this is the sixth time you have been blocked from reporting, you will not be able to use /report for 5 hours.\n\nNote that future abuse of /report could result in a loss of that privilege altogether.", GetPlayerNameEx(playerid), reason);
  403. ShowPlayerDialogEx(giveplayerid,7954,DIALOG_STYLE_MSGBOX,"Temporarily blocked from reports", string,"Next", "");
  404. format(string, sizeof(string), "AdmCmd: %s(%d) was temporarily blocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  405. Log("logs/mute.log", string);
  406. }
  407. for(new i = 0; i < MAX_REPORTS; i++)
  408. {
  409. if(Reports[i][ReportFrom] == giveplayerid)
  410. {
  411. Reports[i][BeingUsed] = 0;
  412. }
  413. }
  414. }
  415. else
  416. {
  417. SendClientMessageEx(playerid, COLOR_GRAD2, "That person is already disabled from /reports.");
  418. }
  419. }
  420. }
  421. else
  422. {
  423. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  424. }
  425. return 1;
  426. }
  427. CMD:rtoreset(playerid, params[])
  428. {
  429. if (PlayerInfo[playerid][pAdmin] >= 3)
  430. {
  431. new string[128], giveplayerid, reason[64];
  432. if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /rtoreset [player] [reason]");
  433. if(IsPlayerConnected(giveplayerid))
  434. {
  435. if(PlayerInfo[giveplayerid][pRMuted] == 2)
  436. {
  437. PlayerInfo[giveplayerid][pRMuted] = 0;
  438. PlayerInfo[giveplayerid][pRMutedTotal]--;
  439. PlayerInfo[giveplayerid][pRMutedTime] = 0;
  440. format(string, sizeof(string), "AdmCmd: %s has unblocked %s from reporting, reason: %s",GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid), reason);
  441. ABroadCast(COLOR_LIGHTRED,string,2);
  442. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "You have been unblocked from submitting reports. You may now use the reporting system again.");
  443. SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Please accept our apologies for any error and inconvenience this may have caused.");
  444. format(string, sizeof(string), "AdmCmd: %s(%d) was unblocked from /report by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), GetPlayerNameEx(playerid), reason);
  445. Log("logs/mute.log", string);
  446. }
  447. else
  448. {
  449. SendClientMessageEx(playerid, COLOR_GRAD1, "That person is not blocked from reporting!");
  450. }
  451. }
  452. }
  453. else
  454. {
  455. SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
  456. }
  457. return 1;
  458. }
  459. CMD:report(playerid, params[])
  460. {
  461. if(GetPVarType(playerid, "HasReport")) {
  462. SendClientMessageEx(playerid, COLOR_GREY, "You can only have 1 active report at a time. (/cancelreport)");
  463. }
  464. else if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdmin] < 1338) {
  465. SendClientMessageEx(playerid, COLOR_GRAD2, "You can't submit reports as an administrator.");
  466. }
  467. else if(PlayerInfo[playerid][pRMuted] != 0) {
  468. ShowPlayerDialogEx(playerid, 7955, DIALOG_STYLE_MSGBOX,"Report blocked","You are blocked from submitting any reports!\n\nTips when reporting:\n- Report what you need, not who you need.\n- Be specific, report exactly what you need.\n- Do not make false reports.\n- Do not flame admins.\n- Report only for in-game items.\n- For shop orders use the /shoporder command","Close", "");
  469. }
  470. else {
  471. ShowPlayerDialogEx(playerid, DIALOG_REPORTMENU, DIALOG_STYLE_LIST, "Report Menu [1/2]", "Deathmatch\nFalling\nHacking\nChicken Running\nCar Ramming\nPower Gaming\nMeta Gaming\nGun Discharge Exploits (QS/CS)\nSpamming\nMoney Farming\nBan Evader\nGeneral Exploits\nReleasing Hitman Names\nRunning Man Exploiter\nCar Surfing\nNonRP Behavior\nNext Page","Select", "Exit");
  472. }
  473. return 1;
  474. }
  475. CMD:cancelreport(playerid, params[])
  476. {
  477. for(new i = 999; i > 0; i--)
  478. {
  479. if(Reports[i][ReportFrom] == playerid)
  480. {
  481. if(GetPVarType(Reports[i][ReportFrom], "AlertedThisPlayer"))
  482. {
  483. DeletePVar(Reports[i][ReportFrom], "AlertedThisPlayer");
  484. DeletePVar(Reports[i][ReportFrom], "AlertType");
  485. if(AlertTime[Reports[i][ReportFrom]] != 0) AlertTime[Reports[i][ReportFrom]] = 0;
  486. }
  487. if(GetPVarInt(Reports[i][ReportFrom], "RequestingAdP") == 1)
  488. {
  489. DeletePVar(Reports[i][ReportFrom], "PriorityAdText");
  490. DeletePVar(Reports[i][ReportFrom], "RequestingAdP");
  491. }
  492. Reports[i][ReportFrom] = INVALID_PLAYER_ID;
  493. Reports[i][BeingUsed] = 0;
  494. Reports[i][TimeToExpire] = 0;
  495. Reports[i][ReportPriority] = 0;
  496. Reports[i][ReportLevel] = 0;
  497. strmid(Reports[i][Report], "None", 0, 4, 4);
  498. DeletePVar(playerid, "HasReport");
  499. DeletePVar(playerid, "_rAutoM");
  500. DeletePVar(playerid, "_rRepID");
  501. SendClientMessageEx(playerid, COLOR_WHITE, "You have successfully canceled your report." );
  502. return 1;
  503. }
  504. }
  505. SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have any pending reports.");
  506. return 1;
  507. }
  508. CMD:reports(playerid, params[])
  509. {
  510. if(PlayerInfo[playerid][pAdmin] >= 2)
  511. {
  512. new string[128];
  513. SendClientMessageEx(playerid, COLOR_GREEN, "____________________ REPORTS _____________________");
  514. for(new i = 999; i >= 0; i--)
  515. {
  516. if(Reports[i][BeingUsed] == 1 && Reports[i][ReportPriority] == 5)
  517. {
  518. if(Reports[i][ReportLevel] == 2 || PlayerInfo[playerid][pAdmin] >= 2)
  519. {
  520. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: %d mins | Pr: %i", GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire], Reports[i][ReportPriority]);
  521. SendClientMessageEx(playerid, COLOR_REPORT, string);
  522. }
  523. }
  524. }
  525. for(new i = 999; i >= 0; i--)
  526. {
  527. if(Reports[i][BeingUsed] == 1 && Reports[i][ReportPriority] == 4)
  528. {
  529. if(Reports[i][ReportLevel] == 2 || PlayerInfo[playerid][pAdmin] >= 2)
  530. {
  531. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: %d mins | Pr: %i", GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire], Reports[i][ReportPriority]);
  532. SendClientMessageEx(playerid, COLOR_REPORT, string);
  533. }
  534. }
  535. }
  536. for(new i = 999; i >= 0; i--)
  537. {
  538. if(Reports[i][BeingUsed] == 1 && Reports[i][ReportPriority] == 3)
  539. {
  540. if(Reports[i][ReportLevel] == 2 || PlayerInfo[playerid][pAdmin] >= 2)
  541. {
  542. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: %d mins | Pr: %i", GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire], Reports[i][ReportPriority]);
  543. SendClientMessageEx(playerid, COLOR_REPORT, string);
  544. }
  545. }
  546. }
  547. for(new i = 999; i >= 0; i--)
  548. {
  549. if(Reports[i][BeingUsed] == 1 && Reports[i][ReportPriority] == 2)
  550. {
  551. if(Reports[i][ReportLevel] == 2 || PlayerInfo[playerid][pAdmin] >= 2)
  552. {
  553. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: %d mins | Pr: %i", GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire], Reports[i][ReportPriority]);
  554. SendClientMessageEx(playerid, COLOR_REPORT, string);
  555. }
  556. }
  557. }
  558. for(new i = 999; i >= 0; i--)
  559. {
  560. if(Reports[i][BeingUsed] == 1 && Reports[i][ReportPriority] == 1)
  561. {
  562. if(Reports[i][ReportLevel] == 2 || PlayerInfo[playerid][pAdmin] >= 2)
  563. {
  564. format(string, sizeof(string), "%s (ID: %i) | RID: %i | %s | Pend: %d mins | Pr: %i", GetPlayerNameEx(Reports[i][ReportFrom]), Reports[i][ReportFrom], i, (Reports[i][Report]), Reports[i][TimeToExpire], Reports[i][ReportPriority]);
  565. SendClientMessageEx(playerid, COLOR_REPORT, string);
  566. }
  567. }
  568. }
  569. SendClientMessageEx(playerid, COLOR_GREEN, "___________________________________________________");
  570. }
  571. return 1;
  572. }
  573. CMD:sta(playerid, params[])
  574. {
  575. if(PlayerInfo[playerid][pAdmin] >= 2)
  576. {
  577. new string[128], reportid;
  578. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /sta [reportid]");
  579. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  580. if(Reports[reportid][BeingUsed] == 0)
  581. {
  582. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  583. return 1;
  584. }
  585. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  586. {
  587. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  588. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  589. Reports[reportid][BeingUsed] = 0;
  590. return 1;
  591. }
  592. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  593. {
  594. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  595. }
  596. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  597. {
  598. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  599. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  600. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  601. }
  602. if(Advisors < 1)
  603. {
  604. SendClientMessageEx(playerid, COLOR_GREY, "There are no Advisors On Duty at the moment, try again later!");
  605. return 1;
  606. }
  607. format(string, sizeof(string), "AdmCmd: %s has sent %s (ID: %i) report RID: %i) to the Advisors.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  608. ABroadCast(COLOR_ORANGE, string, 2);
  609. Log("logs/report.log", string);
  610. if(PlayerInfo[playerid][pAdmin] == 1)
  611. {
  612. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "An admin has reviewed your report and referred it to the Advisors.");
  613. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "An Advisor should be with you shortly.");
  614. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "Newer players are encouraged to use /requesthelp for any questions you may have as opposed to using /report which is to report rule violations and get admin help.");
  615. SetPVarInt( Reports[reportid][ReportFrom], "COMMUNITY_ADVISOR_REQUEST", 1 );
  616. format(string, sizeof(string), "An Admin has referred a report over to you. person %s (ID: %d) stated: %s", GetPlayerNameEx(Reports[reportid][ReportFrom]), Reports[reportid][ReportFrom], Reports[reportid][Report]);
  617. SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, string);
  618. SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, "Please type /accepthelp to teleport to the player.");
  619. }
  620. else
  621. {
  622. format(string, sizeof(string), "%s has reviewed your report and referred it to the Advisors.", GetPlayerNameEx(playerid));
  623. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  624. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "An Advisor should be with you shortly.");
  625. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "Newer players are encouraged to use /requesthelp for any questions you may have as opposed to using /report which is to report rule violations and get admin help.");
  626. SetPVarInt( Reports[reportid][ReportFrom], "COMMUNITY_ADVISOR_REQUEST", 1 );
  627. format(string, sizeof(string), "Admin %s has referred a report over to you. person %s (ID: %d) stated: %s", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), Reports[reportid][ReportFrom], Reports[reportid][Report]);
  628. SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, string);
  629. SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, "Please type /accepthelp to teleport to the player.");
  630. }
  631. PlayerInfo[playerid][pAcceptReport]++;
  632. ReportCount[playerid]++;
  633. ReportHourCount[playerid]++;
  634. Reports[reportid][BeingUsed] = 0;
  635. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  636. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  637. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  638. Reports[reportid][CheckingReport] = INVALID_PLAYER_ID;
  639. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  640. }
  641. return 1;
  642. }
  643. CMD:ar(playerid, params[])
  644. {
  645. if(PlayerInfo[playerid][pAdmin] >= 2)
  646. {
  647. new string[128], reportid;
  648. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /ar [reportid]");
  649. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  650. if(Reports[reportid][BeingUsed] == 0)
  651. {
  652. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  653. return 1;
  654. }
  655. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  656. {
  657. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  658. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  659. Reports[reportid][BeingUsed] = 0;
  660. return 1;
  661. }
  662. if(GetPVarInt(Reports[reportid][ReportFrom], "ReverseReport") == 1)
  663. {
  664. new reversereason[24];
  665. GetPVarString(Reports[reportid][ReportFrom], "ReverseReason", reversereason, 24);
  666. DeletePVar(Reports[reportid][ReportFrom], "ReverseReport");
  667. SetPVarInt(playerid, "ReverseFromID", Reports[reportid][ReportFrom]);
  668. format(string, 128, "%s would like to reverse their action on %s.\n\nReason: %s", GetPlayerNameEx(Reports[reportid][ReportFrom]), GetPlayerNameEx(GetPVarInt(Reports[reportid][ReportFrom], "ReverseID")), reversereason);
  669. ShowPlayerDialogEx(playerid, DIALOG_REVERSE, DIALOG_STYLE_MSGBOX, "Reverse Action", string, "Allow", "Deny");
  670. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  671. ABroadCast(COLOR_ORANGE, string, 2);
  672. Log("logs/report.log", string);
  673. PlayerInfo[playerid][pAcceptReport]++;
  674. ReportCount[playerid]++;
  675. ReportHourCount[playerid]++;
  676. Reports[reportid][BeingUsed] = 0;
  677. Reports[reportid][TimeToExpire] = 0;
  678. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  679. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  680. return 1;
  681. }
  682. if(GetPVarInt(Reports[reportid][ReportFrom], "AccountRestrictionReport") == 1)
  683. {
  684. if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot accept this report!");
  685. SetPVarInt(playerid, "PendingAction4", GetPVarInt(Reports[reportid][ReportFrom], "AccountRestID"));
  686. DeletePVar(Reports[reportid][ReportFrom], "AccountRestrictionReport");
  687. DeletePVar(Reports[reportid][ReportFrom], "AccountRestID");
  688. ShowPlayerDialogEx(playerid, DIALOG_NONRPACTION, DIALOG_STYLE_MSGBOX, "Account Restriction", "This player has 15+ Non RP Points, would you like to restrict his account?", "Yes", "No");
  689. }
  690. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  691. {
  692. if(AlertTime[Reports[reportid][ReportFrom]] != 0)
  693. {
  694. SetPVarInt(playerid, "PendingAction", GetPVarInt(Reports[reportid][ReportFrom], "AlertType"));
  695. SetPVarInt(playerid, "PendingAction2", GetPVarInt(Reports[reportid][ReportFrom], "AlertedThisPlayer"));
  696. SetPVarInt(playerid, "PendingAction3", Reports[reportid][ReportFrom]);
  697. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  698. }
  699. }
  700. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  701. {
  702. new advert[128];
  703. GetPVarString(Reports[reportid][ReportFrom], "PriorityAdText", advert, 128);
  704. SetPVarInt(playerid, "ReporterID", Reports[reportid][ReportFrom]);
  705. ShowPlayerDialogEx(playerid, DIALOG_CONFIRMADP, DIALOG_STYLE_MSGBOX, "Advertisement Confirmation", advert, "Approve", "Deny");
  706. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  707. ABroadCast(COLOR_ORANGE, string, 2);
  708. Log("logs/report.log", string);
  709. PlayerInfo[playerid][pAcceptReport]++;
  710. ReportCount[playerid]++;
  711. ReportHourCount[playerid]++;
  712. Reports[reportid][BeingUsed] = 0;
  713. Reports[reportid][TimeToExpire] = 0;
  714. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  715. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  716. return true;
  717. }
  718. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingNameChange") == 1) {
  719. new newname[MAX_PLAYER_NAME];
  720. GetPVarString(Reports[reportid][ReportFrom], "NewNameRequest", newname, MAX_PLAYER_NAME);
  721. if(GetPVarInt(Reports[reportid][ReportFrom], "NameChangeCost") > 2) format(string, sizeof(string), "{00BFFF}Old Name: {FFFFFF}%s\n\n{00BFFF}New Name: {FFFFFF}%s\n\n{00BFFF}Price: ${FFFFFF}%s", GetPlayerNameExt(Reports[reportid][ReportFrom]), newname, number_format(GetPVarInt(Reports[reportid][ReportFrom], "NameChangeCost")));
  722. else format(string, sizeof(string), "{00BFFF}Old Name: {FFFFFF}%s\n\n{00BFFF}New Name: {FFFFFF}%s\n\n{00BFFF}Price: {FFFFFF}Free", GetPlayerNameExt(Reports[reportid][ReportFrom]), newname);
  723. ShowPlayerDialogEx(playerid, DIALOG_REPORTNAME,DIALOG_STYLE_MSGBOX,"{00BFFF}Name Change Request",string,"Approve","Deny");
  724. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  725. ABroadCast(COLOR_ORANGE, string, 2);
  726. Log("logs/report.log", string);
  727. PlayerInfo[playerid][pAcceptReport]++;
  728. ReportCount[playerid]++;
  729. ReportHourCount[playerid]++;
  730. Reports[reportid][BeingUsed] = 0;
  731. Reports[reportid][TimeToExpire] = 0;
  732. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  733. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  734. SetPVarInt(playerid, "NameChange",Reports[reportid][ReportFrom]);
  735. return 1;
  736. }
  737. if(GetPVarInt(Reports[reportid][ReportFrom], "RFLNameRequest") == 1) {
  738. new newname[MAX_PLAYER_NAME];
  739. new gid = Reports[reportid][ReportFrom];
  740. GetPVarString(Reports[reportid][ReportFrom], "NewRFLName", newname, MAX_PLAYER_NAME);
  741. format(string, sizeof(string), "{00BFFF}Old Team Name: {FFFFFF}%s\n\n{00BFFF}New Team Name: {FFFFFF}%s", RFLInfo[PlayerInfo[gid][pRFLTeam]][RFLname], newname);
  742. ShowPlayerDialogEx(playerid, DIALOG_REPORTTEAMNAME,DIALOG_STYLE_MSGBOX,"{00BFFF}Team Name Change Request",string,"Approve","Deny");
  743. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  744. ABroadCast(COLOR_ORANGE, string, 2);
  745. Log("logs/report.log", string);
  746. PlayerInfo[playerid][pAcceptReport]++;
  747. ReportCount[playerid]++;
  748. ReportHourCount[playerid]++;
  749. Reports[reportid][BeingUsed] = 0;
  750. Reports[reportid][TimeToExpire] = 0;
  751. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  752. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  753. SetPVarInt(playerid, "RFLNameChange",Reports[reportid][ReportFrom]);
  754. return 1;
  755. }
  756. if(GetPVarInt(Reports[reportid][ReportFrom], "hSignRequest")) {
  757. new hSignTxt[64];
  758. GetPVarString(Reports[reportid][ReportFrom], "hSignRequestText", hSignTxt, 64);
  759. ShowPlayerDialogEx(playerid, DIALOG_REPORT_HSIGN, DIALOG_STYLE_MSGBOX, "{00BFFF}House Sale Sign Text Change", hSignTxt, "Approve", "Deny");
  760. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  761. ABroadCast(COLOR_ORANGE, string, 2);
  762. Log("logs/report.log", string);
  763. PlayerInfo[playerid][pAcceptReport]++;
  764. ReportCount[playerid]++;
  765. ReportHourCount[playerid]++;
  766. Reports[reportid][BeingUsed] = 0;
  767. Reports[reportid][TimeToExpire] = 0;
  768. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  769. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  770. SetPVarInt(playerid, "hSignTextChange", Reports[reportid][ReportFrom]);
  771. return 1;
  772. }
  773. format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
  774. ABroadCast(COLOR_ORANGE, string, 2);
  775. Log("logs/report.log", string);
  776. AddReportToken(playerid); // Report Tokens
  777. format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
  778. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  779. new giveplayerid;
  780. if(GetPVarType(Reports[reportid][ReportFrom], "_rAutoM")) {
  781. switch(GetPVarInt(Reports[reportid][ReportFrom], "_rAutoM")) {
  782. case 1: { // Ad Unmute
  783. ShowAdMuteFine(Reports[reportid][ReportFrom]);
  784. format(string, sizeof(string), "You offered %s an unmute from /ads.", GetPlayerNameEx(Reports[reportid][ReportFrom]));
  785. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  786. }
  787. case 2: { // NUnmute
  788. ShowNMuteFine(Reports[reportid][ReportFrom]);
  789. format(string, sizeof(string), "You offered %s an unmute from /newb.", GetPlayerNameEx(Reports[reportid][ReportFrom]));
  790. SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
  791. }
  792. case 3: { // NRN
  793. giveplayerid = GetPVarInt(Reports[reportid][ReportFrom], "_rRepID");
  794. if(IsPlayerConnected(giveplayerid)) {
  795. if (PlayerInfo[giveplayerid][pAdmin] < 2) {
  796. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has offered %s a free name change because their name is non-RP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  797. foreach(new i: Player)
  798. {
  799. if(PlayerInfo[i][pSMod] == 1) {
  800. SendClientMessageEx(i, COLOR_YELLOW, string);
  801. }
  802. }
  803. ABroadCast( COLOR_YELLOW, string, 2);
  804. ShowPlayerDialogEx(giveplayerid, DIALOG_NAMECHANGE2, DIALOG_STYLE_INPUT, "Free name change","This is a roleplay server where you must have a name in this format: Firstname_Lastname.\nFor example: John_Smith or Jimmy_Johnson\n\nAn admin has offered you to change your name to the correct format for free. Please enter your desired name below.\n\nNote: If you press cancel you will be kicked from the server.", "Change", "Cancel" );
  805. }
  806. else
  807. {
  808. SendClientMessageEx(playerid, COLOR_GREY, "You cannot offer admins an nrn.");
  809. }
  810. }
  811. }
  812. case 4: { // RK /kills
  813. giveplayerid = GetPVarInt(Reports[reportid][ReportFrom], "_rRepID");
  814. if(IsPlayerConnected(giveplayerid)) {
  815. SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
  816. format(string, sizeof(string), "<< Last 10 Kills/Deaths of %s >>", GetPlayerNameEx(giveplayerid));
  817. SendClientMessageEx(playerid, COLOR_YELLOW, string);
  818. GetLatestKills(playerid, giveplayerid);
  819. SpectatePlayer(playerid, giveplayerid);
  820. }
  821. }
  822. case 5: { // Auto Spectate
  823. giveplayerid = GetPVarInt(Reports[reportid][ReportFrom], "_rRepID");
  824. if(IsPlayerConnected(giveplayerid)) {
  825. SpectatePlayer(playerid, giveplayerid);
  826. }
  827. }
  828. case 6: { // Bug Player
  829. giveplayerid = GetPVarInt(Reports[reportid][ReportFrom], "_rRepID");
  830. if(IsPlayerConnected(giveplayerid)) {
  831. SetPVarInt(playerid, "BigEar", 6);
  832. SetPVarInt(playerid, "BigEarPlayer", giveplayerid);
  833. rBigEarT[playerid] = 30;
  834. format(string, sizeof(string), "You will hear all messages from %s (ID: %d) for 30 seconds. Use /bigears if you want to disable it.", GetPlayerNameEx(giveplayerid), giveplayerid);
  835. SendClientMessageEx(playerid, COLOR_WHITE, string);
  836. }
  837. }
  838. }
  839. } PlayerInfo[playerid][pAcceptReport]++;
  840. ReportCount[playerid]++;
  841. ReportHourCount[playerid]++;
  842. Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
  843. Reports[reportid][CheckingReport] = playerid;
  844. Reports[reportid][BeingUsed] = 0;
  845. Reports[reportid][TimeToExpire] = 0;
  846. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  847. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  848. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  849. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); }
  850. return 1;
  851. }
  852. CMD:tr(playerid, params[])
  853. {
  854. if(PlayerInfo[playerid][pAdmin] >= 2)
  855. {
  856. new string[128], reportid;
  857. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [reportid]");
  858. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  859. if(Reports[reportid][BeingUsed] == 0)
  860. {
  861. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  862. return 1;
  863. }
  864. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  865. {
  866. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  867. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  868. Reports[reportid][BeingUsed] = 0;
  869. return 1;
  870. }
  871. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  872. {
  873. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  874. }
  875. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  876. {
  877. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  878. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  879. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  880. }
  881. format(string, sizeof(string), "AdmCmd: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
  882. ABroadCast(COLOR_ORANGE, string, 2);
  883. Log("logs/report.log", string);
  884. format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
  885. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  886. PlayerInfo[playerid][pTrashReport]++;
  887. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  888. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  889. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  890. Reports[reportid][BeingUsed] = 0;
  891. Reports[reportid][TimeToExpire] = 0;
  892. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  893. }
  894. return 1;
  895. }
  896. CMD:dmr(playerid, params[])
  897. {
  898. if(PlayerInfo[playerid][pAdmin] >= 2)
  899. {
  900. new string[128], reportid, giveplayerid;
  901. if(sscanf(params, "du", reportid, giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /dmr [reportid] [DM'ers ID]");
  902. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  903. if(Reports[reportid][BeingUsed] == 0)
  904. {
  905. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  906. return 1;
  907. }
  908. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  909. {
  910. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  911. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  912. Reports[reportid][BeingUsed] = 0;
  913. return 1;
  914. }
  915. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  916. {
  917. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  918. }
  919. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  920. {
  921. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot forward a DM Alert to the Watch Dogs Team.");
  922. }
  923. format(string, sizeof(string), "AdmCmd: %s has forwarded the report from %s (RID: %d) to the DM Report system", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
  924. ABroadCast(COLOR_ORANGE, string, 2);
  925. Log("logs/report.log", string);
  926. format(string, sizeof(string), "%s has acknowledged your report about death matching.", GetPlayerNameEx(playerid));
  927. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  928. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "In the future please use the /dmreport command for all reports regarding DM.");
  929. if(PlayerInfo[Reports[reportid][ReportFrom]][pAdmin] >= 2 || PlayerInfo[Reports[reportid][ReportFrom]][pSMod] == 1) mysql_format(MainPipeline, string, sizeof(string), "INSERT INTO dm_watchdog (id,reporter,timestamp,superwatch) VALUES (%d,%d,%d,1)", GetPlayerSQLId(giveplayerid), GetPlayerSQLId(Reports[reportid][ReportFrom]), gettime());
  930. else mysql_format(MainPipeline, string, sizeof(string), "INSERT INTO dm_watchdog (id,reporter,timestamp) VALUES (%d,%d,%d)", GetPlayerSQLId(giveplayerid), GetPlayerSQLId(Reports[reportid][ReportFrom]), gettime());
  931. mysql_tquery(MainPipeline, string, "OnQueryFinish", "ii", SENDDATA_THREAD, Reports[reportid][ReportFrom]);
  932. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  933. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  934. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  935. Reports[reportid][BeingUsed] = 0;
  936. Reports[reportid][TimeToExpire] = 0;
  937. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  938. }
  939. return 1;
  940. }
  941. CMD:nao(playerid, params[])
  942. {
  943. if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pASM] >= 1)
  944. {
  945. new string[128], reportid;
  946. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /nao [reportid]");
  947. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  948. if(Reports[reportid][BeingUsed] == 0)
  949. {
  950. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  951. return 1;
  952. }
  953. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  954. {
  955. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  956. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  957. Reports[reportid][BeingUsed] = 0;
  958. return 1;
  959. }
  960. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  961. {
  962. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  963. }
  964. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  965. {
  966. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  967. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  968. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  969. }
  970. format(string, sizeof(string), "AdmCmd: %s has cleared report from %s (RID: %d) due to not having admin of sufficient authority online.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
  971. ABroadCast(COLOR_ORANGE, string, 2);
  972. Log("logs/report.log", string);
  973. format(string, sizeof(string), "%s has reviewed your report, however there is not an Admin presently online with sufficient authority to handle your request.", GetPlayerNameEx(playerid));
  974. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  975. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "You can post a request on the forums for additional assistance (www.ng-gaming.net/forums). Our apologies for the inconvenience. ");
  976. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  977. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  978. DeletePVar(Reports[reportid][ReportFrom], "_rRepID");
  979. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  980. Reports[reportid][BeingUsed] = 0;
  981. Reports[reportid][TimeToExpire] = 0;
  982. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  983. }
  984. return 1;
  985. }
  986. CMD:post(playerid, params[])
  987. {
  988. if(PlayerInfo[playerid][pAdmin] >= 2)
  989. {
  990. new string[128], reportid;
  991. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /post [reportid]");
  992. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  993. if(Reports[reportid][BeingUsed] == 0)
  994. {
  995. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  996. return 1;
  997. }
  998. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  999. {
  1000. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  1001. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1002. Reports[reportid][BeingUsed] = 0;
  1003. return 1;
  1004. }
  1005. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  1006. {
  1007. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  1008. }
  1009. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  1010. {
  1011. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  1012. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  1013. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  1014. }
  1015. format(string, sizeof(string), "AdmCmd: %s has cleared report from %s (RID: %d) due to it needing to be handled on the forums", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
  1016. ABroadCast(COLOR_ORANGE, string, 2);
  1017. Log("logs/report.log", string);
  1018. format(string, sizeof(string), "%s has reviewed your report and determined this report should be handled on the forums (i.e. complaint or request.)", GetPlayerNameEx(playerid));
  1019. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  1020. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "Please only report for items that are actively occuring in game. (www.ng-gaming.net/forums)");
  1021. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  1022. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  1023. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1024. Reports[reportid][BeingUsed] = 0;
  1025. Reports[reportid][TimeToExpire] = 0;
  1026. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  1027. }
  1028. return 1;
  1029. }
  1030. CMD:st(playerid, params[])
  1031. {
  1032. if(PlayerInfo[playerid][pAdmin] >= 2)
  1033. {
  1034. new string[128], reportid;
  1035. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /st [reportid]");
  1036. if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!"); return 1; }
  1037. if(Reports[reportid][BeingUsed] == 0)
  1038. {
  1039. SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  1040. return 1;
  1041. }
  1042. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  1043. {
  1044. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  1045. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1046. Reports[reportid][BeingUsed] = 0;
  1047. return 1;
  1048. }
  1049. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1)
  1050. {
  1051. return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/post this advertisement, you must accept it with /ar.");
  1052. }
  1053. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  1054. {
  1055. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  1056. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  1057. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  1058. }
  1059. format(string, sizeof(string), "AdmCmd: %s has cleared report from %s (RID: %d) due to it needing to be handled via /shoporder", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
  1060. ABroadCast(COLOR_ORANGE, string, 2);
  1061. Log("logs/report.log", string);
  1062. format(string, sizeof(string), "%s has reviewed your report and determined it needs to be handled by a Shop Tech.", GetPlayerNameEx(playerid));
  1063. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  1064. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, "Please use /shoporder to get your order processed by a Shop Tech.");
  1065. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  1066. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  1067. DeletePVar(Reports[reportid][ReportFrom], "_rRepID"); Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1068. Reports[reportid][BeingUsed] = 0;
  1069. Reports[reportid][TimeToExpire] = 0;
  1070. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  1071. }
  1072. return 1;
  1073. }
  1074. CMD:ts(playerid, params[])
  1075. {
  1076. if(PlayerInfo[playerid][pAdmin] >= 2)
  1077. {
  1078. new string[128], reportid;
  1079. if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /ts [reportid]");
  1080. if(reportid < 0 || reportid > 999) return SendClientMessageEx(playerid, COLOR_GREY, " Report ID not below 0 or above 999!");
  1081. if(Reports[reportid][BeingUsed] == 0) return SendClientMessageEx(playerid, COLOR_GREY, " That report ID is not being used!");
  1082. if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
  1083. {
  1084. SendClientMessageEx(playerid, COLOR_GREY, " The reporter has disconnected !");
  1085. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1086. Reports[reportid][BeingUsed] = 0;
  1087. return 1;
  1088. }
  1089. if(GetPVarInt(Reports[reportid][ReportFrom], "RequestingAdP") == 1) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot trash/ts this advertisement, you must accept it with /ar.");
  1090. if(GetPVarType(Reports[reportid][ReportFrom], "AlertedThisPlayer"))
  1091. {
  1092. DeletePVar(Reports[reportid][ReportFrom], "AlertedThisPlayer");
  1093. DeletePVar(Reports[reportid][ReportFrom], "AlertType");
  1094. if(AlertTime[Reports[reportid][ReportFrom]] != 0) AlertTime[Reports[reportid][ReportFrom]] = 0;
  1095. }
  1096. format(string, sizeof(string), "AdmCmd: %s has cleared report from %s (RID: %d) due to it needing to be handled on TeamSpeak", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]), reportid);
  1097. ABroadCast(COLOR_ORANGE, string, 2);
  1098. Log("logs/report.log", string);
  1099. format(string, sizeof(string), "%s has reviewed your report and determined this report should be handled on TeamSpeak (Admin Assistance Channels)", GetPlayerNameEx(playerid));
  1100. SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
  1101. DeletePVar(Reports[reportid][ReportFrom], "HasReport");
  1102. DeletePVar(Reports[reportid][ReportFrom], "_rAutoM");
  1103. DeletePVar(Reports[reportid][ReportFrom], "_rRepID");
  1104. Reports[reportid][ReportFrom] = INVALID_PLAYER_ID;
  1105. Reports[reportid][BeingUsed] = 0;
  1106. Reports[reportid][TimeToExpire] = 0;
  1107. strmid(Reports[reportid][Report], "None", 0, 4, 4);
  1108. }
  1109. return 1;
  1110. }