Omatter

Untitled

Jul 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.93 KB | None | 0 0
  1. new Helpers = 0;
  2. CMD:xemtatcacauhoi(playerid, params[])
  3. {
  4. if(GetPVarInt(playerid, "HelperDuty") == 0)
  5. {
  6. SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
  7. }
  8. else if(PlayerInfo[playerid][pHelper] >= 1)
  9. {
  10. new string[128], reason[64];
  11. SendClientMessageEx(playerid, COLOR_GREEN, "____________CAU HOI____________");
  12. foreach(new i: Player)
  13. {
  14. if(GetPVarInt(i, "HELPERS_REQUEST"))
  15. {
  16. GetPVarString(i, "CauHoi", reason, 64);
  17. format(string, sizeof(string), "%s(%i) | Thoi gian cau hoi: %i Phut(/xemcauhoi %i).", GetPlayerNameEx(i), i, GetPVarInt(i, "ThoiGian"), i);
  18. SendClientMessageEx(playerid, COLOR_REPORT, string);
  19. }
  20. else
  21. {
  22. SendClientMessageEx(playerid, COLOR_REPORT, "Hien tai chua co cau hoi nao dua ra.");
  23. }
  24. }
  25. }
  26. return 1;
  27. }
  28. CMD:xemcauhoi(playerid, params[])
  29. {
  30. if(GetPVarInt(playerid, "HelperDuty") == 0)
  31. {
  32. SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
  33. }
  34. else if(PlayerInfo[playerid][pHelper] >= 1)
  35. {
  36. if(sscanf(params, "u", params[0])) return SendClientMessageEx(playerid, COLOR_GREY, "Su dung: /xemcauhoi [playerid]");
  37. {
  38. if(GetPVarInt(params[0], "YeuCau") == 0)
  39. {
  40. SendClientMessageEx(playerid, COLOR_GREY, "Nguoi do chua dua ra cau hoi.");
  41. }
  42. else
  43. {
  44. foreach(new i: Player)
  45. {
  46. new reason[128];
  47. if(GetPVarInt(i, "HELPERS_REQUEST"))
  48. {
  49. GetPVarString(i, "CauHoi", reason, 128);
  50. new str[2460], str1[1280], str2[1280], str3[1280], str4[1280], name[1280];
  51. format(str1, sizeof(str), "{FFFFFF}ID: %s", GetPlayerNameEx(params[0]));
  52. format(str2, sizeof(str), "Cau hoi: \n%s",reason);
  53. format(str3, sizeof(str), "Thoi gian cau hoi: %i phut", GetPVarInt(i, "ThoiGian"));
  54. format(str4, sizeof(str), "{FFFF00}Su dung lenh /dap [playerid][noi dung]");
  55. format(str, sizeof(str), "%s\n\n%s\n\n%s\n%s\n", str1,str2,str3,str4);
  56. format(name, sizeof(name), "Xem cau hoi - %s", GetPlayerNameEx(params[0]));
  57. ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, name, str, "Ok", "");
  58. }
  59. }
  60. }
  61. }
  62. }
  63. return 1;
  64. }
  65. CMD:huybocauhoi(playerid, params[])
  66. {
  67. new stringcac[128];
  68. if(!gPlayerLogged{playerid})
  69. {
  70. SendClientMessageEx(playerid, COLOR_GREY, "Ban chua dang nhap.");
  71. }
  72. else if(GetPVarInt(playerid, "YeuCau") == 0)
  73. {
  74. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co cau hoi nao de huy bo.");
  75. }
  76. else
  77. {
  78. DeletePVar(playerid,"CauHoi");
  79. DeletePVar(playerid,"YeuCau");
  80. SendClientMessageEx(playerid, COLOR_WHITE,"Ban da huy bo cau hoi cua ban.");
  81. format(stringcac, sizeof(stringcac), "%s da huy bo cau hoi cua chinh minh.",GetPlayerNameEx(playerid));
  82. //SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
  83. foreach(new i: Player)
  84. {
  85. if(PlayerInfo[i][pHelper] >=1)
  86. {
  87. SendClientMessage(i, COLOR_YELLOW, stringcac);
  88. }
  89. }
  90. }
  91. return 1;
  92. }
  93. CMD:dap(playerid, params[])
  94. {
  95. if(PlayerInfo[playerid][pHelper] < 1)
  96. {
  97. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai la Helpers.");
  98. }
  99. else if(GetPVarInt(playerid, "HelperDuty") == 0) {
  100. SendClientMessageEx(playerid, COLOR_GREY, "Ban dang offduty Helpers, khong the lam viec nay!");
  101. }
  102. else
  103. {
  104.  
  105. new Player,
  106. reason[64],
  107. stringg[128];
  108.  
  109. if(sscanf(params, "us[64]", Player, reason))
  110. {
  111. SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /dap [playerid] [text]");
  112. }
  113. else if(Player == playerid)
  114. {
  115. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the chap nhan cau hoi tu chinh minh.");
  116. }
  117. else if(GetPVarInt(Player, "YeuCau") == 0)
  118. {
  119. SendClientMessageEx(playerid, COLOR_GREY, "Nguoi do chua dua ra cau hoi.");
  120. }
  121. else
  122. {
  123. format(stringg, sizeof(stringg), "%s da tra loi cau hoi cua %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Player));
  124. //SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
  125. foreach(new i: Player)
  126. {
  127. if(PlayerInfo[i][pHelper] >=1)
  128. {
  129. SendClientMessage(i, COLOR_NEWBIE, stringg);
  130. }
  131. }
  132.  
  133. format(stringg, sizeof(stringg), "[%s] da chap nhan cau hoi cua ban.",GetPlayerNameEx(playerid));
  134. SendClientMessageEx(Player, COLOR_GREEN, stringg);
  135. new stringdi[128];
  136. new stringme[128];
  137. GetPVarString(Player, "CauHoi", stringdi, 128);
  138. if (gNewbie[playerid]==0)
  139. {
  140. format(stringdi, sizeof(stringdi),"%s hoi: %s",GetPlayerNameEx(Player), stringdi);
  141. SendClientMessageToAll(COLOR_NEWBIE, stringdi);
  142. format(stringme, sizeof(stringme),"[%s] tra loi: %s",GetPlayerNameEx(playerid), reason);
  143. SendClientMessageToAll(COLOR_NEWBIE, stringme);
  144. ReportCount[playerid]++;
  145. ReportHourCount[playerid]++;
  146. AddCAReportToken(playerid);
  147. DeletePVar(Player,"CauHoi");
  148. DeletePVar(Player,"YeuCau");
  149. }
  150. return 1;
  151. }
  152. }
  153. return 1;
  154. }
  155. new LastMessage[MAX_PLAYERS];
  156. CMD:newb(playerid, params[])
  157. {
  158. if((GetTickCount() - LastMessage[playerid]) < 60000)
  159. return SendClientMessage(playerid, COLOR_GREY, "Phai Doi 60 Giay Sau Moi Hoi Tiep.");
  160. new stringloz[128];
  161. if(isnull(params))
  162. {
  163. SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /newb [noi dung]");
  164. return 1;
  165. }
  166. if(Helpers < 1)
  167. {
  168. SendClientMessageEx(playerid, COLOR_GREY, "Hien tai chua co Helpers nao Onduty, vui long cho!");
  169. return 1;
  170. }
  171. if(PlayerInfo[playerid][pHelper] == 1)
  172. {
  173. SendClientMessageEx(playerid, COLOR_RED, "Ban la Helper khong the su dung lenh nay de tranh spam!");
  174. return 1;
  175. }
  176. if(PlayerInfo[playerid][pHelper] >= 2)
  177. {
  178. SendClientMessageEx(playerid, COLOR_RED, "Ban la Advisors khong the su dung lenh nay de tranh spam!");
  179. return 1;
  180. }
  181. if(PlayerInfo[playerid][pAdmin] >= 1)
  182. {
  183. SendClientMessageEx(playerid, COLOR_RED, "Ban la Admin khong the su dung lenh nay de tranh spam!");
  184. return 1;
  185. }
  186. if(GetPVarInt(playerid, "YeuCau") == 1)
  187. {
  188. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da gui cau hoi cua ban len kenh newb, vui long doi ho tra loi.");
  189. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Neu ban doi qua lau hay su dung lenh(/huybocauhoi).");
  190. }
  191. if(gNewbie[playerid]==1)
  192. {
  193. SendClientMessageEx(playerid, COLOR_GREY, "Ban da bi vo hieu hoa kenh chat Newbie, /tognewbie de hoat dong tro lai!");
  194. return 1;
  195. }
  196. if ((nonewbie))
  197. {
  198. SendClientMessageEx(playerid, COLOR_GRAD2, "Kenh newbie da bi vo hieu hoa boi {FF0000}Admin{BFC0C2}");
  199. return 1;
  200. }
  201. format(stringloz, sizeof(stringloz),"%s da dat ra mot cau hoi, su dung (/xemcauhoi %i).", GetPlayerNameEx(playerid), playerid);
  202. // SendDutyHelperMessage(TEAM_AZTECAS_COLOR, string);
  203. foreach(new i: Player)
  204. {
  205. if(PlayerInfo[i][pHelper] >=1)
  206. {
  207. SendClientMessage(i, COLOR_NEWBIE, stringloz);
  208. }
  209. }
  210. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da gui cau hoi cua ban len kenh newb, vui long doi ho tra loi.");
  211. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Neu ban doi qua lau hay su dung lenh(/huybocauhoi).");
  212. SetPVarInt(playerid, "HELPERS_REQUEST", 1);
  213. SetPVarInt(playerid, "ThoiGian", 3);
  214. SetTimerEx("ThoiGianNgung", 30000, 0, "d", playerid);
  215. SetPVarInt(playerid, "YeuCau", 1);
  216. SetPVarString(playerid, "CauHoi", params);
  217. return 1;
  218. }
  219. CMD:hduty(playerid, params[])
  220. {
  221. if(PlayerInfo[playerid][pHelper] >= 1)
  222. {
  223. if(GetPVarInt(playerid, "HelperDuty") == 1)
  224. {
  225. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da Offduty Helpers, ban khong nhan duoc mot cau hoi nao nua.");
  226. DeletePVar(playerid, "HelperDuty");
  227. Helpers -= 1;
  228. }
  229. else
  230. {
  231. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da Onduty Helpers, bay gio ban co the nhan cau hoi tu members.");
  232. SetPVarInt(playerid, "HelperDuty", 1);
  233. Helpers += 1;
  234. }
  235. }
  236. else
  237. {
  238. SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong phai la Helpers");
  239. }
  240. return 1;
  241. }
Add Comment
Please, Sign In to add comment