Advertisement
Matrix1

гаси команди

Jun 15th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2. if(strcmp(cmd, "/gasikomandi", true) == 0)
  3. {
  4. if (PlayerInfo[playerid][pAdmin] >= 1337)
  5. {
  6. ShowPlayerDialog(playerid, 122, DIALOG_STYLE_LIST, "{00C0FF}Izgasete Komanda", "1. Pomos\n2. Report\n3. Event", "Izgasi", "Izlezi");
  7. }
  8. else
  9. {
  10. SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda.");
  11. }
  12. return 1;
  13. }
  14.  
  15.  
  16. if(dialogid == 122)
  17. {
  18. if(response)
  19. {
  20. if(listitem == 0)//POMOS
  21. {
  22. if (PlayerInfo[playerid][pAdmin] >= 1337 && (!pomosoff))
  23. {
  24. pomosoff = 1;
  25. BroadCast(COLOR_GREEN, "/pomos Komandata e Vklucena.");
  26. }
  27. else if (PlayerInfo[playerid][pAdmin] >= 1337 && (pomosoff))
  28. {
  29. pomosoff = 0;
  30. BroadCast(COLOR_RED, "/pomos Komandata e Isklucena.");
  31. }
  32. else
  33. {
  34. SendClientMessage(playerid, COLOR_GRAD1, "{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda!");
  35. }
  36. }
  37. else if(listitem == 1)//REPORT
  38. {
  39. if (PlayerInfo[playerid][pAdmin] >= 1337 && (!reportoff))
  40. {
  41. reportoff = 1;
  42. BroadCast(COLOR_GREEN, "/report Komandata e Vklucena.");
  43. }
  44. else if (PlayerInfo[playerid][pAdmin] >= 1337 && (reportoff))
  45. {
  46. reportoff = 0;
  47. BroadCast(COLOR_RED, "/report Komandata e Isklucena.");
  48. }
  49. else
  50. {
  51. SendClientMessage(playerid, COLOR_GRAD1, "{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda!");
  52. }
  53. }
  54. else if(listitem == 2)//EVENT
  55. {
  56. if (PlayerInfo[playerid][pAdmin] >= 1337 && (!eventoff))
  57. {
  58. eventoff = 1;
  59. BroadCast(COLOR_GREEN, "/event Komandata e Vklucena.");
  60. }
  61. else if (PlayerInfo[playerid][pAdmin] >= 1337 && (eventoff))
  62. {
  63. eventoff = 0;
  64. BroadCast(COLOR_RED, "/event Komandata e Isklucena.");
  65. }
  66. else
  67. {
  68. SendClientMessage(playerid, COLOR_GRAD1, "{FF4040}GRESKA:{FFFFFF}Ne ste Ovlasteni za ovaa Komanda!");
  69. }
  70. }
  71. }
  72. return 1;
  73. }
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. //------------------------------------------------------------------------------
  85. if(!strcmp(cmdtext, "/event", true))
  86. {
  87. if(IsPlayerConnected(playerid))
  88. {
  89. if(gPlayerLogged[playerid] == 0)
  90. {
  91. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Mora da ste Logirani.");
  92. return 1;
  93. }
  94. if(eventoff == 0)
  95. {
  96. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Momentalno komandata e isklucena.");
  97. return 1;
  98. }
  99. if(Event[playerid] > 0)
  100. {
  101. SCM(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Vekje imate se Prijaveno,Pocekajte 1 minuta.");
  102. return 1;
  103. }
  104. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  105. format(string, 256, "%s[%i] se prijavi za event.", sendername,playerid);
  106. ABroadCast(COLOR_YELLOW,string,1);
  107. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Se prijavivte na Event.");
  108. Event[playerid] = 1;
  109. SetTimer("EventReset", 60000, 0);
  110. }
  111. return 1;
  112. }
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. //------------------------------------------------------------------------------
  126. if(strcmp(cmd, "/pomos", true) == 0)
  127. {
  128. if(IsPlayerConnected(playerid))
  129. {
  130. if(pomosoff == 0)
  131. {
  132. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Momentalno komandata e isklucena.");
  133. return 1;
  134. }
  135. if(Pomos[playerid] > 0)
  136. {
  137. SCM(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Vekje imate isprateno Barajne za Pomos,Pocekajte 1 minuta.");
  138. return 1;
  139. }
  140. new length = strlen(cmdtext);
  141. while ((idx < length) && (cmdtext[idx] <= ' '))
  142. {
  143. idx++;
  144. }
  145. new offset = idx;
  146. new result[64];
  147. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  148. {
  149. result[idx - offset] = cmdtext[idx];
  150. idx++;
  151. }
  152. result[idx - offset] = EOS;
  153. if(!strlen(result))
  154. {
  155. SendClientMessage(playerid, COLOR_GRAD2, "{37F906}INFO:{FFFFFF}/pomos [text]");
  156. return 1;
  157. }
  158. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  159. format(string, sizeof(string), "Prasanje od [ID:%d] %s: %s", playerid, sendername, (result));
  160. ABroadCast(COLOR_GREEN,string,1);
  161. SendClientMessage(playerid, COLOR_RED, "Prasanjeto e isprateno na Administratorite.");
  162. Pomos[playerid] = 1;
  163. SetTimer("PomosReset", 60000, 0);
  164. }
  165. return 1;
  166. }
  167. //------------------------------------------------------------------------------
  168. if(strcmp(cmd, "/report", true) == 0)
  169. {
  170. if(IsPlayerConnected(playerid))
  171. {
  172. tmp = strtok(cmdtext, idx);
  173. if(reportoff == 0)
  174. {
  175. SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Momentalno komandata e isklucena.");
  176. return 1;
  177. }
  178. if(!strlen(tmp))
  179. {
  180. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}/report [ID/Ime na Igracot] [pricina].");
  181. return 1;
  182. }
  183. if(Report[playerid] > 0)
  184. {
  185. SCM(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Vekje imate Prijaveno,Pocekajte 1 minuta.");
  186. return 1;
  187. }
  188. giveplayerid = strval(tmp);
  189. if(IsPlayerConnected(giveplayerid))
  190. {
  191. if(giveplayerid != INVALID_PLAYER_ID)
  192. {
  193. new length = strlen(cmdtext);
  194. while ((idx < length) && (cmdtext[idx] <= ' '))
  195. {
  196. idx++;
  197. }
  198. new offset = idx;
  199. new result[64];
  200. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  201. {
  202. result[idx - offset] = cmdtext[idx];
  203. idx++;
  204. }
  205. result[idx - offset] = EOS;
  206. if(!strlen(result))
  207. {
  208. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}/report [ID/Ime na Igracot] [pricina].");
  209. return 1;
  210. }
  211. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  212. format(string, sizeof(string), "[%d]%s go prijavi igracot [%d]%s, Pricina: %s.", playerid, sendername, giveplayerid, giveplayer, (result));
  213. ABroadCast(COLOR_YELLOW,string,1);
  214. SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Vasata prijava e pratena na Administratorite i ke bidne razgledana.");
  215. Report[playerid] = 1;
  216. SetTimer("ReportReset", 60000, 0);
  217. }
  218. }
  219. }
  220. return 1;
  221. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement