Guest User

Untitled

a guest
Jan 24th, 2020
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //New-ebtan
  2. new qwerty228[3500];
  3. //YCMD-ebtan
  4. YCMD:gnews(playerid, params[],help)
  5. {
  6. if(PlayerInfo[playerid][pMuted] == 1)
  7. {
  8. format(YCMDstr, sizeof(YCMDstr), "Tqven Gadevt Chatis Bani! Moxsnamde Darcha: %d Wami",PlayerInfo[playerid][pMuteTime]);
  9. SendClientMessage(playerid, COLOR_LIGHTRED, YCMDstr);
  10. return true;
  11. }
  12. if(IsIP(params[1]))
  13. {
  14. new YCMDstr123[126];
  15. format(YCMDstr123, sizeof(YCMDstr123), "%s Chaixsna! Mizezi: Shesadzlebelia Sxva Serveris Ipis Gabazreba!",Name(playerid));
  16. ABroadCast(COLOR_LIGHTRED,YCMDstr123,1);
  17. PlayerInfo[playerid][pMember] = 0;
  18. PlayerInfo[playerid][pLeader] = 0;
  19. PlayerInfo[playerid][pRank] = 0;
  20. dostup[playerid] = 0;
  21. OnPlayerUpdateAc(playerid);
  22. return true;
  23. }
  24.  
  25. if(IsACop(playerid) || IsAArm(playerid) || IsAMayor(playerid) || IsAMedic(playerid) || IsALicenser(playerid))
  26. {
  27. if(CanGov(playerid))
  28. {
  29. new count_player_row = GetPVarInt(playerid,"count_row");
  30. new max_rows = GetPVarInt(playerid, "max_rows");
  31. new get_goverment_text[100];
  32. new set_pvar_string[15];
  33. qwerty228="";
  34. if(!max_rows)
  35. {
  36. if(sscanf(params,"i",params[0])) return SendClientMessage(playerid, -1, "Sheiyvanet: /gnews [Strofebis Raodenoba]");
  37. if(params[0] < 1 || params[0] > 5) return SendClientMessage(playerid, -1, "1 Dan 5 Strofamde");
  38. SetPVarInt(playerid,"max_rows", params[0] + 1);
  39. SetPVarInt(playerid, "count_row", 1);
  40. format(qwerty228, 256, "Tqven Govistvis Gamoyavit: %d Strofi {C0C0C0}| Sheiyvanet /gnews [Strofi 1]", params[0]);
  41. SendClientMessage(playerid, 0x489191C8, qwerty228);
  42. }
  43. else
  44. {
  45. if(max_rows == count_player_row)
  46. {
  47. SendClientMessageToAll(-1,"=======================[{269BD8}Goverment News{FFFFFF}]=======================");
  48. for(new i = 1; i < max_rows; i++)
  49. {
  50. format(set_pvar_string, 15, "gnews%d", i);
  51. GetPVarString(playerid, set_pvar_string, get_goverment_text, 100);
  52.  
  53. format(qwerty228, 256, "News: %s[%d]: {ffffff}%s", Name(playerid),playerid, get_goverment_text );
  54. SendClientMessageToAll(GetPlayerColor(playerid), qwerty228);
  55. }
  56. SendClientMessageToAll(-1, "=============================================================");
  57. DeletePVar(playerid,"max_rows");
  58. DeletePVar(playerid,"count_row");
  59. return 1;
  60. }
  61. format(qwerty228, 64, "Gamoiyene: /gnews [Strofi %d]",count_player_row);
  62. format(set_pvar_string, 15, "gnews%d", count_player_row);
  63. SetPVarString(playerid, set_pvar_string, params);
  64. if(count_player_row + 1 == max_rows)
  65. {
  66. format(qwerty228, 255, "Strofi %d : %s", count_player_row, params);
  67. SendClientMessage(playerid,0xD6D6D6C8, qwerty228);
  68. SendClientMessage(playerid, COLOR_GREEN, "Gaimeoret CMD /gnews Rom Gaushvat Gamzadebuli Teqsti");
  69. }
  70. else
  71. {
  72. format(qwerty228, 255, "Strofi %d : %s {489191}| Sheiyvanet /gnews [Strofi %d]", count_player_row, params, count_player_row + 1);
  73. SendClientMessage(playerid, 0xD6D6D6C8, qwerty228);
  74. }
  75. SetPVarInt(playerid,"count_row", count_player_row + 1);
  76. }
  77. }
  78. else
  79. {
  80. SendClientMessage(playerid, COLOR_GREY, "Tqven Ar Gaqvt Sakmarsi Rank Am Command's Gamosayeneblad!");
  81. return true;
  82. }
  83. }
  84. else
  85. {
  86. SendClientMessage(playerid, COLOR_GREY, "Tqven Ver Gamoiyenebt Am Command's!");
  87. return true;
  88. }
  89. return true;
  90. }
  91. //stock-ebtan
  92. stock CanGov(playerid)
  93. {
  94. if(PlayerInfo[playerid][pLeader] >= 1) return true;
  95. new rank = PlayerInfo[playerid][pRank];
  96. switch(PlayerInfo[playerid][pMember])
  97. {
  98. case 1:
  99. {
  100. switch(rank)
  101. {
  102. case 15:return true;
  103. case 14:return true;
  104. case 13:return true;
  105. }
  106. }
  107. case 2:
  108. {
  109. switch(rank)
  110. {
  111. case 10:return true;
  112. case 9:return true;
  113. case 8:return true;
  114. }
  115. }
  116. case 3:
  117. {
  118. switch(rank)
  119. {
  120. case 16:return true;
  121. case 15:return true;
  122. case 14:return true;
  123. }
  124. }
  125. case 4:
  126. {
  127. switch(rank)
  128. {
  129. case 10:return true;
  130. case 9:return true;
  131. case 8:return true;
  132. }
  133. }
  134. case 5:
  135. {
  136. switch(rank)
  137. {
  138. case 10:return true;
  139. case 9:return true;
  140. case 8:return true;
  141. }
  142. }
  143. case 6:
  144. {
  145. switch(rank)
  146. {
  147. case 10:return true;
  148. case 9:return true;
  149. case 8:return true;
  150. }
  151. }
  152. case 7:
  153. {
  154. switch(rank)
  155. {
  156. case 6:return true;
  157. case 5:return true;
  158. case 4:return true;
  159. }
  160. }
  161. case 8:
  162. {
  163. switch(rank)
  164. {
  165. case 2:return true;
  166. }
  167. }
  168. case 9:
  169. {
  170. switch(rank)
  171. {
  172. case 10:return true;
  173. case 9:return true;
  174. case 8:return true;
  175. }
  176. }
  177. case 10:
  178. {
  179. switch(rank)
  180. {
  181. case 15:return true;
  182. case 14:return true;
  183. case 13:return true;
  184. }
  185. }
  186. case 11..18:
  187. {
  188. switch(rank)
  189. {
  190. case 10:return true;
  191. case 9:return true;
  192. case 8:return true;
  193. }
  194. }
  195. case 19:
  196. {
  197. switch(rank)
  198. {
  199. case 16:return true;
  200. case 15:return true;
  201. case 14:return true;
  202. }
  203. }
  204. case 20:
  205. {
  206. switch(rank)
  207. {
  208. case 10:return true;
  209. case 9:return true;
  210. case 8:return true;
  211. }
  212. }
  213. case 21:
  214. {
  215. switch(rank)
  216. {
  217. case 15:return true;
  218. case 14:return true;
  219. case 13:return true;
  220. }
  221. }
  222. case 22:
  223. {
  224. switch(rank)
  225. {
  226. case 10:return true;
  227. case 9:return true;
  228. case 8:return true;
  229. }
  230. }
  231. case 23:
  232. {
  233. switch(rank)
  234. {
  235. case 8:return true;
  236. case 7:return true;
  237. }
  238. }
  239. case 24:
  240. {
  241. switch(rank)
  242. {
  243. case 12:return true;
  244. case 11:return true;
  245. }
  246. }
  247. case 29:
  248. {
  249. switch(rank)
  250. {
  251. case 6:return true;
  252. case 5:return true;
  253. }
  254. }
  255. case 28:
  256. {
  257. switch(rank)
  258. {
  259. case 8:return true;
  260. case 7:return true;
  261. }
  262. }
  263. case 25:
  264. {
  265. switch(rank)
  266. {
  267. case 8:return true;
  268. case 7:return true;
  269. }
  270. }
  271. case 26:
  272. {
  273. switch(rank)
  274. {
  275. case 9:return true;
  276. case 8:return true;
  277. }
  278. }
  279. case 33:
  280. {
  281. switch(rank)
  282. {
  283. case 10:return true;
  284. case 9:return true;
  285. case 8:return true;
  286. }
  287. }
  288. case 34:
  289. {
  290. switch(rank)
  291. {
  292. case 5:return true;
  293. case 4:return true;
  294. }
  295. }
  296. case 37:
  297. {
  298. switch(rank)
  299. {
  300. case 10:return true;
  301. case 9:return true;
  302. }
  303. }
  304. }
  305. return false;
  306. }
RAW Paste Data