hopingsteam

Untitled

Jul 13th, 2018
135
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. task CustomPickups[1000]() {
  2. if (PlayerToPoint(2.0, i, 1173.2563,-1323.3102,15.3943))
  3. {// Hospital near Ammu
  4. GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
  5. }
  6. else if (PlayerToPoint(2.0, i, 2029.5945,-1404.6426,17.2512))
  7. {// Hospital near speedway
  8. GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
  9. }
  10. else if (PlayerToPoint(3, i,1480.9103,-1770.3743,18.7958))
  11. {
  12. GameTextForPlayer(i, "~y~Welcome to the ~r~City Hall~n~~w~Type /enter to go in", 5000, 5);
  13. }
  14. else if (GetPlayerState(i) == 1 && PlayerToPoint(1.0, i,242.7591,66.4315,1003.6406))
  15. {
  16. if(PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pLeader] == 3 || PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pMember] == 3)
  17. {
  18. GameTextForPlayer(i, "~g~Police Department elevator~n~~w~Type ~r~/pdup ~w~to go up~n~Type ~r~/pddown ~w~to go down", 5000, 3);
  19. }
  20. else
  21. {
  22. GameTextForPlayer(i, "~r~Staff only!", 5000, 3);
  23. }
  24. }
  25. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1110.9738,-305.4099,73.9922))
  26. {
  27. GameTextForPlayer(i, "~g~Hitman Undercover Place,~n~~y~Use /disguise", 5000, 3);
  28. }
  29. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2752.7515,-1962.4762,13.5469))
  30. {
  31. GameTextForPlayer(i, "~g~LSV Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  32. }
  33. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,690.5870,-1275.9880,13.5600))
  34. {
  35. GameTextForPlayer(i, "~g~VLA Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  36. }
  37. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2146.2664,-1470.3286,25.7121))
  38. {
  39. GameTextForPlayer(i, "~g~Ballas Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  40. }
  41. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2498.6650,-1687.3389,13.5035))
  42. {
  43. GameTextForPlayer(i, "~g~Grove Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  44. }
  45. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1107.4956,-315.6171,74.7422))
  46. {
  47. GameTextForPlayer(i, "~g~Hitman Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  48. }
  49. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1308.5664,-47.2725,1001.0313))
  50. {
  51. GameTextForPlayer(i, "~g~Russian Mafia Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  52. }
  53. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2561.5168,-1305.3997,1060.9844))
  54. {
  55. GameTextForPlayer(i, "~g~Yakuza Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  56. }
  57. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2651.3530,638.9305,14.4531))
  58. {
  59. GameTextForPlayer(i, "~g~Medic HQ,~n~~y~Use /enter", 5000, 3);
  60. }
  61. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2060.3362,469.6569,35.1723))
  62. {
  63. GameTextForPlayer(i, "~g~News HQ,~n~~y~Use /enter", 5000, 3);
  64. }
  65. else if (PlayerToPoint(2.0, i, 694.7092,-455.9879,16.3359))
  66. {
  67. GameTextForPlayer(i, "~r~Materials Shop~n~~w~To sell type /sellmats~n~To buy type /buymats", 5000, 3);
  68. }
  69. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1381.0413,-1088.8511,27.3906) || PlayerToPoint(2.0, i,-1963.6067,437.5748,35.1719))
  70. {
  71. GameTextForPlayer(i, "~g~Welcome,~n~~y~Use /mission to take on a Mission", 5000, 3);
  72. }
  73. else if (PlayerToPoint(3, i,2027.5966,1008.9321,10.8203) || PlayerToPoint(3, i,-2190.7061,641.7987,49.4375) || PlayerToPoint(3, i,2769.5718,-1953.5166,13.3783) || PlayerToPoint(3, i,679.4280,-1276.8392,13.5956) || PlayerToPoint(3, i,2156.3076,-1455.8517,25.5391) || PlayerToPoint(3, i,2494.8640,-1668.1879,13.3438))
  74. {
  75. GameTextForPlayer(i, "~g~Gang Seif,~n~~y~Scrie /depune ca sa depui si /retrage ca sa scoti", 5000, 5);
  76. }
  77. else if (PlayerToPoint(3, i,597.1277,-1248.6479,18.2734))
  78. {
  79. GameTextForPlayer(i, "~w~Type ~r~/Materials get ~w~ to get some materials", 5000, 5);
  80. }
  81. else if (PlayerToPoint(3, i,-2119.5469,-178.5679,35.3203))
  82. {
  83. GameTextForPlayer(i, "~w~Type ~g~/Materials deliver ~w~ to deliver materials", 5000, 5);
  84. }
  85. else if (PlayerToPoint(3, i,-1982.8839,164.2848,27.6875))
  86. {
  87. GameTextForPlayer(i, "~w~Type: ~r~/withdraw ~w~to withdraw your money", 5000, 5);
  88. }
  89. else if (PlayerToPoint(2, i,1080.9414,-344.6483,73.9815))
  90. {
  91. GameTextForPlayer(i, "~r~Order ~w~Place.", 5000, 3);
  92. }
  93. else if (PlayerToPoint(2.0, i,-2640.9878,635.8196,14.4531) || PlayerToPoint(2.0, i,1179.4683,-1338.6075,13.8445))
  94. {
  95. GameTextForPlayer(i, "~w~Type /get healkit, to get ~r~HealKit", 5000, 3);
  96. SetPlayerHealthEx(i, 100);
  97. }
  98. }
  99. // ' Asta ramane aici
  100. if(strcmp(cmd,"/mk",true)==0) {
  101. if(PlayerInfo[playerid][pAdmin] < 4) return SendErrorMessage(playerid, AdminOnly);
  102. new x_mk[128];
  103. x_mk = strtok(cmdtext, idx);
  104. if(!strlen(x_mk)) {
  105. SendUsageMessage(playerid, "/mk [name]");
  106. SendClientMessage(playerid, COLOR_GREY, "Available names: (/mk text [number] [text]) (/mk game [number] [text]) (/mk cp [number])");
  107. SendClientMessage(playerid, COLOR_GREY, "Available names: (/mk title [text]) (/mk reward [price]) (/mk usecp)");
  108. return 1;
  109. }
  110. if(strcmp(x_mk,"text",true) == 0) {
  111. tmp = strtok(cmdtext, idx);
  112. if(!strlen(x_mk)) {
  113. SendUsageMessage(playerid, "/mk text [number] [text]");
  114. return 1;
  115. }
  116. new number = strval(tmp);
  117. if(number < 1 || number > 18) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 18 !"); return 1; }
  118. new length = strlen(cmdtext);
  119. while ((idx < length) && (cmdtext[idx] <= ' ')) {
  120. idx++;
  121. }
  122. new offset = idx;
  123. new result[64];
  124. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
  125. result[idx - offset] = cmdtext[idx];
  126. idx++;
  127. }
  128. result[idx - offset] = EOS;
  129. if(!strlen(result)) {
  130. SendUsageMessage(playerid, "(/mk text [number] [text]");
  131. return 1;
  132. }
  133. switch(number) {
  134. case 1: {
  135. strmid(MissionInfo[mText1], result, 0, strlen(result), 255);
  136. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st Text Line of the Mission.");
  137. }
  138. case 2: {
  139. strmid(MissionInfo[mText2], result, 0, strlen(result), 255);
  140. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd Text Line of the Mission.");
  141. }
  142. case 3: {
  143. strmid(MissionInfo[mText3], result, 0, strlen(result), 255);
  144. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd Text Line of the Mission.");
  145. }
  146. case 4: {
  147. strmid(MissionInfo[mText4], result, 0, strlen(result), 255);
  148. SendClientMessage(playerid, COLOR_WHITE, "You've made the 4th Text Line of the Mission.");
  149. }
  150. case 5: {
  151. strmid(MissionInfo[mText5], result, 0, strlen(result), 255);
  152. SendClientMessage(playerid, COLOR_WHITE, "You've made the 5th Text Line of the Mission.");
  153. }
  154. case 6: {
  155. strmid(MissionInfo[mText6], result, 0, strlen(result), 255);
  156. SendClientMessage(playerid, COLOR_WHITE, "You've made the 6th Text Line of the Mission.");
  157. }
  158. case 7: {
  159. strmid(MissionInfo[mText7], result, 0, strlen(result), 255);
  160. SendClientMessage(playerid, COLOR_WHITE, "You've made the 7th Text Line of the Mission.");
  161. }
  162. case 8: {
  163. strmid(MissionInfo[mText8], result, 0, strlen(result), 255);
  164. SendClientMessage(playerid, COLOR_WHITE, "You've made the 8th Text Line of the Mission.");
  165. }
  166. case 9: {
  167. strmid(MissionInfo[mText9], result, 0, strlen(result), 255);
  168. SendClientMessage(playerid, COLOR_WHITE, "You've made the 9th Text Line of the Mission.");
  169. }
  170. case 10: {
  171. strmid(MissionInfo[mText10], result, 0, strlen(result), 255);
  172. SendClientMessage(playerid, COLOR_WHITE, "You've made the 10th Text Line of the Mission.");
  173. }
  174. case 11: {
  175. strmid(MissionInfo[mText11], result, 0, strlen(result), 255);
  176. SendClientMessage(playerid, COLOR_WHITE, "You've made the 11th Text Line of the Mission.");
  177. }
  178. case 12: {
  179. strmid(MissionInfo[mText12], result, 0, strlen(result), 255);
  180. SendClientMessage(playerid, COLOR_WHITE, "You've made the 12th Text Line of the Mission.");
  181. }
  182. case 13: {
  183. strmid(MissionInfo[mText13], result, 0, strlen(result), 255);
  184. SendClientMessage(playerid, COLOR_WHITE, "You've made the 13th Text Line of the Mission.");
  185. }
  186. case 14: {
  187. strmid(MissionInfo[mText14], result, 0, strlen(result), 255);
  188. SendClientMessage(playerid, COLOR_WHITE, "You've made the 14th Text Line of the Mission.");
  189. }
  190. case 15: {
  191. strmid(MissionInfo[mText15], result, 0, strlen(result), 255);
  192. SendClientMessage(playerid, COLOR_WHITE, "You've made the 15th Text Line of the Mission.");
  193. }
  194. case 16: {
  195. strmid(MissionInfo[mText16], result, 0, strlen(result), 255);
  196. SendClientMessage(playerid, COLOR_WHITE, "You've made the 16th Text Line of the Mission.");
  197. }
  198. case 17: {
  199. strmid(MissionInfo[mText17], result, 0, strlen(result), 255);
  200. SendClientMessage(playerid, COLOR_WHITE, "You've made the 17th Text Line of the Mission.");
  201. }
  202. case 18: {
  203. strmid(MissionInfo[mText18], result, 0, strlen(result), 255);
  204. SendClientMessage(playerid, COLOR_WHITE, "You've made the 18th Text Line of the Mission.");
  205. }
  206. }
  207. }
  208. else if(strcmp(x_mk,"game",true) == 0) {
  209. tmp = strtok(cmdtext, idx);
  210. if(!strlen(x_mk)) return SendUsageMessage(playerid, "/mk game [number] [text]");
  211. new number = strval(tmp);
  212. if(number < 1 || number > 6) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 6 !"); return 1; }
  213. new length = strlen(cmdtext);
  214. while ((idx < length) && (cmdtext[idx] <= ' ')) {
  215. idx++;
  216. }
  217. new offset = idx;
  218. new result[64];
  219. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
  220. result[idx - offset] = cmdtext[idx];
  221. idx++;
  222. }
  223. result[idx - offset] = EOS;
  224. if(!strlen(result)) return SendUsageMessage(playerid, "(/mk game [number] [text]");
  225. switch(number) {
  226. case 1:
  227. {
  228. strmid(MissionInfo[mGText1], result, 0, strlen(result), 255);
  229. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st GameText Line of the Mission.");
  230. }
  231. case 2:
  232. {
  233. strmid(MissionInfo[mGText2], result, 0, strlen(result), 255);
  234. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd GameText Line of the Mission.");
  235. }
  236. case 3:
  237. {
  238. strmid(MissionInfo[mGText3], result, 0, strlen(result), 255);
  239. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd GameText Line of the Mission.");
  240. }
  241. case 4:
  242. {
  243. strmid(MissionInfo[mGText4], result, 0, strlen(result), 255);
  244. SendClientMessage(playerid, COLOR_WHITE, "You've made the 4th GameText Line of the Mission.");
  245. }
  246. case 5:
  247. {
  248. strmid(MissionInfo[mGText5], result, 0, strlen(result), 255);
  249. SendClientMessage(playerid, COLOR_WHITE, "You've made the 5th GameText Line of the Mission.");
  250. }
  251. case 6:
  252. {
  253. strmid(MissionInfo[mGText6], result, 0, strlen(result), 255);
  254. SendClientMessage(playerid, COLOR_WHITE, "You've made the 6th GameText Line of the Mission.");
  255. }
  256. }
  257. }
  258. else if(strcmp(x_mk,"cp",true) == 0)
  259. {
  260. tmp = strtok(cmdtext, idx);
  261. if(!strlen(x_mk))
  262. {
  263. SendUsageMessage(playerid, "/mk cp [number]");
  264. return 1;
  265. }
  266. new number = strval(tmp);
  267. if(number < 1 || number > 6) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 6 !"); return 1; }
  268. new Float:X,Float:Y,Float:Z;
  269. GetPlayerPos(playerid, X,Y,Z);
  270. switch(number)
  271. {
  272. case 1:
  273. {
  274. MissionInfo[mCP1][0] = X; MissionInfo[mCP1][1] = Y; MissionInfo[mCP1][2] = Z;
  275. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st Checkpoint of the Mission.");
  276. }
  277. case 2:
  278. {
  279. MissionInfo[mCP2][0] = X; MissionInfo[mCP2][1] = Y; MissionInfo[mCP2][2] = Z;
  280. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd Checkpoint Line of the Mission.");
  281. }
  282. case 3:
  283. {
  284. MissionInfo[mCP3][0] = X; MissionInfo[mCP3][1] = Y; MissionInfo[mCP3][2] = Z;
  285. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd Checkpoint Line of the Mission.");
  286. }
  287. case 4:
  288. {
  289. MissionInfo[mCP4][0] = X; MissionInfo[mCP4][1] = Y; MissionInfo[mCP4][2] = Z;
  290. SendClientMessage(playerid, COLOR_WHITE, "You've made the 4th Checkpoint Line of the Mission.");
  291. }
  292. case 5:
  293. {
  294. MissionInfo[mCP5][0] = X; MissionInfo[mCP5][1] = Y; MissionInfo[mCP5][2] = Z;
  295. SendClientMessage(playerid, COLOR_WHITE, "You've made the 5th Checkpoint Line of the Mission.");
  296. }
  297. case 6:
  298. {
  299. MissionInfo[mCP6][0] = X; MissionInfo[mCP6][1] = Y; MissionInfo[mCP6][2] = Z;
  300. SendClientMessage(playerid, COLOR_WHITE, "You've made the 6th Checkpoint Line of the Mission.");
  301. }
  302. }
  303. }
  304. else if(strcmp(x_mk,"usecp",true) == 0)
  305. {
  306. tmp = strtok(cmdtext, idx);
  307. if(!strlen(x_mk))
  308. {
  309. SendUsageMessage(playerid, "/mk usecp [0/1]");
  310. return 1;
  311. }
  312. new toggle = strval(tmp);
  313. if(toggle == 0 || toggle == 1) { }
  314. else { SendClientMessage(playerid, COLOR_GREY, " CheckpointUse number must be 0 (OFF) or 1 (ON) !"); return 1; }
  315. MissionInfo[mToggle] = toggle;
  316. if(toggle == 0) { SendClientMessage(playerid, COLOR_WHITE, "You've set the Use of Checkpoints to 0 (OFF)."); }
  317. else if(toggle == 1) { SendClientMessage(playerid, COLOR_WHITE, "You've set the Use of Checkpoints to 1 (ON)."); }
  318. }
  319. else if(strcmp(x_mk,"title",true) == 0)
  320. {
  321. new length = strlen(cmdtext);
  322. while ((idx < length) && (cmdtext[idx] <= ' '))
  323. {
  324. idx++;
  325. }
  326. new offset = idx;
  327. new result[64];
  328. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  329. {
  330. result[idx - offset] = cmdtext[idx];
  331. idx++;
  332. }
  333. result[idx - offset] = EOS;
  334. if(!strlen(result))
  335. {
  336. SendUsageMessage(playerid, "(/mk title [text]");
  337. return 1;
  338. }
  339. strmid(MissionInfo[mTitle], result, 0, strlen(result), 255);
  340. SendClientMessage(playerid, COLOR_WHITE, "You've made the Title of the Mission.");
  341. }
  342. else if(strcmp(x_mk,"reward",true) == 0)
  343. {
  344. tmp = strtok(cmdtext, idx);
  345. if(!strlen(x_mk))
  346. {
  347. SendUsageMessage(playerid, "/mk reward [price]");
  348. return 1;
  349. }
  350. new price = strval(tmp);
  351. if(price < 1 || price > 50000) { SendClientMessage(playerid, COLOR_GREY, " Reward Price can't be below 1 or above 50000 !"); return 1; }
  352. MissionInfo[mReward] = price;
  353. SendClientMessage(playerid, COLOR_WHITE, "You've made the Reward Price for the Mission.");
  354. }
  355. else
  356. {
  357. SendClientMessage(playerid, COLOR_GREY, " Invalid Mission Making name !");
  358. return 1;
  359. }
  360. return 1;
  361. }
  362. if(strcmp(cmd,"/nrgmk",true)==0)
  363. {
  364. if(PlayerInfo[playerid][pClubLeader] != 1)
  365. {
  366. SendClientMessage(playerid, COLOR_GREY, " You are not a NRG CLUB Leader !");
  367. return 1;
  368. }
  369. new x_mk[128];
  370. x_mk = strtok(cmdtext, idx);
  371. if(!strlen(x_mk)) {
  372. SendUsageMessage(playerid, "/nrgmk [name]");
  373. SendClientMessage(playerid, COLOR_GREY, "Available names: (/nrgmk text [number] [text]) (/nrgmk game [number] [text]) (/nrgmk cp [number])");
  374. SendClientMessage(playerid, COLOR_GREY, "Available names: (/nrgmk title [text]) (/nrgmk reward [price]) (/nrgmk usecp)");
  375. return 1;
  376. }
  377. if(strcmp(x_mk,"text",true) == 0)
  378. {
  379. tmp = strtok(cmdtext, idx);
  380. if(!strlen(x_mk))
  381. {
  382. SendUsageMessage(playerid, "/nrgmk text [number] [text]");
  383. return 1;
  384. }
  385. new number = strval(tmp);
  386. if(number < 1 || number > 3) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 3 !"); return 1; }
  387. new length = strlen(cmdtext);
  388. while ((idx < length) && (cmdtext[idx] <= ' '))
  389. {
  390. idx++;
  391. }
  392. new offset = idx;
  393. new result[64];
  394. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  395. {
  396. result[idx - offset] = cmdtext[idx];
  397. idx++;
  398. }
  399. result[idx - offset] = EOS;
  400. if(!strlen(result))
  401. {
  402. SendUsageMessage(playerid, "(/nrgmk text [number] [text]");
  403. return 1;
  404. }
  405. switch(number)
  406. {
  407. case 1:
  408. {
  409. strmid(NRGMissionInfo[nrgmText1], result, 0, strlen(result), 255);
  410. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st Text Line of the NRG Mission.");
  411. }
  412. case 2:
  413. {
  414. strmid(NRGMissionInfo[nrgmText2], result, 0, strlen(result), 255);
  415. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd Text Line of the NRG Mission.");
  416. }
  417. case 3:
  418. {
  419. strmid(NRGMissionInfo[nrgmText3], result, 0, strlen(result), 255);
  420. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd Text Line of the NRG Mission.");
  421. }
  422. }
  423. }
  424. else if(strcmp(x_mk,"game",true) == 0)
  425. {
  426. tmp = strtok(cmdtext, idx);
  427. if(!strlen(x_mk))
  428. {
  429. SendUsageMessage(playerid, "/nrgmk game [number] [text]");
  430. return 1;
  431. }
  432. new number = strval(tmp);
  433. if(number < 1 || number > 6) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 6 !"); return 1; }
  434. new length = strlen(cmdtext);
  435. while ((idx < length) && (cmdtext[idx] <= ' '))
  436. {
  437. idx++;
  438. }
  439. new offset = idx;
  440. new result[64];
  441. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  442. {
  443. result[idx - offset] = cmdtext[idx];
  444. idx++;
  445. }
  446. result[idx - offset] = EOS;
  447. if(!strlen(result))
  448. {
  449. SendUsageMessage(playerid, "(/nrgmk game [number] [text]");
  450. return 1;
  451. }
  452. switch(number)
  453. {
  454. case 1:
  455. {
  456. strmid(NRGMissionInfo[nrgmGText1], result, 0, strlen(result), 255);
  457. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st GameText Line of the NRG Mission.");
  458. }
  459. case 2:
  460. {
  461. strmid(NRGMissionInfo[nrgmGText2], result, 0, strlen(result), 255);
  462. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd GameText Line of the NRG Mission.");
  463. }
  464. case 3:
  465. {
  466. strmid(NRGMissionInfo[nrgmGText3], result, 0, strlen(result), 255);
  467. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd GameText Line of the NRG Mission.");
  468. }
  469. case 4:
  470. {
  471. strmid(NRGMissionInfo[nrgmGText4], result, 0, strlen(result), 255);
  472. SendClientMessage(playerid, COLOR_WHITE, "You've made the 4th GameText Line of the NRG Mission.");
  473. }
  474. case 5:
  475. {
  476. strmid(NRGMissionInfo[nrgmGText5], result, 0, strlen(result), 255);
  477. SendClientMessage(playerid, COLOR_WHITE, "You've made the 5th GameText Line of the NRG Mission.");
  478. }
  479. case 6:
  480. {
  481. strmid(NRGMissionInfo[nrgmGText6], result, 0, strlen(result), 255);
  482. SendClientMessage(playerid, COLOR_WHITE, "You've made the 6th GameText Line of the NRG Mission.");
  483. }
  484. }
  485. }
  486. else if(strcmp(x_mk,"cp",true) == 0)
  487. {
  488. tmp = strtok(cmdtext, idx);
  489. if(!strlen(x_mk))
  490. {
  491. SendUsageMessage(playerid, "/nrgmk cp [number]");
  492. return 1;
  493. }
  494. new number = strval(tmp);
  495. if(number < 1 || number > 6) { SendClientMessage(playerid, COLOR_GREY, " Number can't be below 1 or above 6 !"); return 1; }
  496. new Float:X,Float:Y,Float:Z;
  497. GetPlayerPos(playerid, X,Y,Z);
  498. switch(number)
  499. {
  500. case 1:
  501. {
  502. NRGMissionInfo[nrgmCP1][0] = X; NRGMissionInfo[nrgmCP1][1] = Y; NRGMissionInfo[nrgmCP1][2] = Z;
  503. SendClientMessage(playerid, COLOR_WHITE, "You've made the 1st Checkpoint of the NRG Mission.");
  504. }
  505. case 2:
  506. {
  507. NRGMissionInfo[nrgmCP2][0] = X; NRGMissionInfo[nrgmCP2][1] = Y; NRGMissionInfo[nrgmCP2][2] = Z;
  508. SendClientMessage(playerid, COLOR_WHITE, "You've made the 2nd Checkpoint Line of the NRG Mission.");
  509. }
  510. case 3:
  511. {
  512. NRGMissionInfo[nrgmCP3][0] = X; NRGMissionInfo[nrgmCP3][1] = Y; NRGMissionInfo[nrgmCP3][2] = Z;
  513. SendClientMessage(playerid, COLOR_WHITE, "You've made the 3rd Checkpoint Line of the NRG Mission.");
  514. }
  515. case 4:
  516. {
  517. NRGMissionInfo[nrgmCP4][0] = X; NRGMissionInfo[nrgmCP4][1] = Y; NRGMissionInfo[nrgmCP4][2] = Z;
  518. SendClientMessage(playerid, COLOR_WHITE, "You've made the 4th Checkpoint Line of the NRG Mission.");
  519. }
  520. case 5:
  521. {
  522. NRGMissionInfo[nrgmCP5][0] = X; NRGMissionInfo[nrgmCP5][1] = Y; NRGMissionInfo[nrgmCP5][2] = Z;
  523. SendClientMessage(playerid, COLOR_WHITE, "You've made the 5th Checkpoint Line of the NRG Mission.");
  524. }
  525. case 6:
  526. {
  527. NRGMissionInfo[nrgmCP6][0] = X; NRGMissionInfo[nrgmCP6][1] = Y; NRGMissionInfo[nrgmCP6][2] = Z;
  528. SendClientMessage(playerid, COLOR_WHITE, "You've made the 6th Checkpoint Line of the NRG Mission.");
  529. }
  530. }
  531. }
  532. else if(strcmp(x_mk,"usecp",true) == 0)
  533. {
  534. tmp = strtok(cmdtext, idx);
  535. if(!strlen(x_mk))
  536. {
  537. SendUsageMessage(playerid, "/nrgmk usecp [0/1]");
  538. return 1;
  539. }
  540. new toggle = strval(tmp);
  541. if(toggle == 0 || toggle == 1) { }
  542. else { SendClientMessage(playerid, COLOR_GREY, " CheckpointUse number must be 0 (OFF) or 1 (ON) !"); return 1; }
  543. NRGMissionInfo[nrgmToggle] = toggle;
  544. if(toggle == 0) { SendClientMessage(playerid, COLOR_WHITE, "You've set the Use of Checkpoints to 0 (OFF)."); }
  545. else if(toggle == 1) { SendClientMessage(playerid, COLOR_WHITE, "You've set the Use of Checkpoints to 1 (ON)."); }
  546. }
  547. else if(strcmp(x_mk,"title",true) == 0)
  548. {
  549. new length = strlen(cmdtext);
  550. while ((idx < length) && (cmdtext[idx] <= ' '))
  551. {
  552. idx++;
  553. }
  554. new offset = idx;
  555. new result[64];
  556. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  557. {
  558. result[idx - offset] = cmdtext[idx];
  559. idx++;
  560. }
  561. result[idx - offset] = EOS;
  562. if(!strlen(result))
  563. {
  564. SendUsageMessage(playerid, "(/nrgmk title [text]");
  565. return 1;
  566. }
  567. strmid(NRGMissionInfo[nrgmTitle], result, 0, strlen(result), 255);
  568. SendClientMessage(playerid, COLOR_WHITE, "You've made the Title of the NRG Mission.");
  569. }
  570. else if(strcmp(x_mk,"reward",true) == 0)
  571. {
  572. tmp = strtok(cmdtext, idx);
  573. if(!strlen(x_mk))
  574. {
  575. SendUsageMessage(playerid, "/nrgmk reward [price]");
  576. return 1;
  577. }
  578. new price = strval(tmp);
  579. if(price < 1 || price > 1000) { SendClientMessage(playerid, COLOR_GREY, " Reward Price can't be below 1 or above 1000 !"); return 1; }
  580. NRGMissionInfo[nrgmReward] = price;
  581. SendClientMessage(playerid, COLOR_WHITE, "You've made the Reward Price for the NRG Mission.");
  582. }
  583. else
  584. {
  585. SendClientMessage(playerid, COLOR_GREY, " Invalid NRG Mission Making name !");
  586. return 1;
  587. }
  588. return 1;
  589. }
RAW Paste Data