Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.66 KB | None | 0 0
  1. /////////////////// Them vao cuoi gamemodes
  2. /////////////////////////////////////////////// VUT SUNG //////////////////////////////////////////////////////
  3. CMD:vutsung(playerid, params[])
  4. {
  5. if(isnull(params))
  6. {
  7. SendClientMessageEx(playerid, COLOR_GREY, "Su dung: /vutsung [weapon name]");
  8. SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: sdpistol, shotgun, 9mm, mp5, uzi, tec9, rifle, deagle, ak47, m4, spas12, camera");
  9. SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: flowers, knuckles, baseballbat, cane, shovel, poolcue, golfclub, katana, dildo, parachute");
  10. if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
  11. {
  12. SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: knife");
  13. }
  14. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || (PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 11)
  15. {
  16. SendClientMessageEx(playerid, COLOR_GRAD2, "Ten Co San: nitestick, mace, smoke, chainsaw, fire");
  17. }
  18. return 1;
  19. }
  20.  
  21. if(IsPlayerInAnyVehicle(playerid))
  22. {
  23. SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the vut sung trong xe!");
  24. return 1;
  25. }
  26. if(GetPVarInt(playerid, "IsInArena") >= 0)
  27. {
  28. SendClientMessageEx(playerid, COLOR_WHITE, "Ban khong the lam viec do bay gio, ban dang trong Dau Truong!");
  29. return 1;
  30. }
  31. if(GetPVarInt( playerid, "EventToken") != 0)
  32. {
  33. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the lam dieu nay khi dang trong event.");
  34. return 1;
  35. }
  36. new string[128];
  37. if(strcmp(params, "sdpistol", true) == 0)
  38. {
  39. if(PlayerInfo[playerid][pGuns][ 2 ] == 23)
  40. {
  41. if(pTazer{playerid} == 1) return SendClientMessageEx(playerid, COLOR_RED, "Ban khong the vut bo sung dien.");
  42. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo silenced pistol.");
  43. format(string, sizeof(string), "* %s da vut bo silenced pistol.", GetPlayerNameEx(playerid));
  44. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  45. RemovePlayerWeapon(playerid, 23);
  46. if(IsACop(playerid)) return 1;
  47. new Float:X,Float:Y,Float:Z;
  48. GetPlayerPos(playerid, X, Y, Z);
  49. new GunID = 23;
  50. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  51. }
  52. else
  53. {
  54. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  55. }
  56. }
  57. else if(strcmp(params, "camera", true) == 0)
  58. {
  59. if(PlayerInfo[playerid][pGuns][ 9 ] == 43)
  60. {
  61. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo camera.");
  62. format(string, sizeof(string), "* %s da vut bo camera.", GetPlayerNameEx(playerid));
  63. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  64. RemovePlayerWeapon(playerid, 43);
  65. if(IsACop(playerid)) return 1;
  66. new Float:X,Float:Y,Float:Z;
  67. GetPlayerPos(playerid, X, Y, Z);
  68. new GunID = 43;
  69. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  70. }
  71. else
  72. {
  73. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  74. }
  75. }
  76. else if(strcmp(params, "nitestick", true) == 0)
  77. {
  78. if(PlayerInfo[playerid][pGuns][1] == 3)
  79. {
  80. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo nitestick.");
  81. format(string, sizeof(string), "* %s da vut bo nitestick.", GetPlayerNameEx(playerid));
  82. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  83. RemovePlayerWeapon(playerid, 3);
  84. if(IsACop(playerid)) return 1;
  85. new Float:X,Float:Y,Float:Z;
  86. GetPlayerPos(playerid, X, Y, Z);
  87. new GunID = 3;
  88. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  89. }
  90. else
  91. {
  92. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  93. }
  94. }
  95. else if(strcmp(params, "mace", true) == 0)
  96. {
  97. if(PlayerInfo[playerid][pGuns][9] == 41)
  98. {
  99. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo mace.");
  100. format(string, sizeof(string), "* %s da vut bo mace.", GetPlayerNameEx(playerid));
  101. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  102. RemovePlayerWeapon(playerid, 41);
  103. if(IsACop(playerid)) return 1;
  104. new Float:X,Float:Y,Float:Z;
  105. GetPlayerPos(playerid, X, Y, Z);
  106. new GunID = 41;
  107. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  108. }
  109. else
  110. {
  111. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  112. }
  113. }
  114. else if(strcmp(params, "knife", true) == 0)
  115. {
  116. if(PlayerInfo[playerid][pGuns][ 1 ] == 4)
  117. {
  118. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo dao.");
  119. format(string, sizeof(string), "* %s da vut bo dao.", GetPlayerNameEx(playerid));
  120. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  121. RemovePlayerWeapon(playerid, 4);
  122. if(IsACop(playerid)) return 1;
  123. new Float:X,Float:Y,Float:Z;
  124. GetPlayerPos(playerid, X, Y, Z);
  125. new GunID = 4;
  126. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  127. }
  128. else
  129. {
  130. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  131. }
  132. }
  133. else if(strcmp(params, "9mm", true) == 0)
  134. {
  135. if(PlayerInfo[playerid][pGuns][ 2 ] == 22)
  136. {
  137. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo 9mm pistol.");
  138. format(string, sizeof(string), "* %s da vut bo 9mm pistol.", GetPlayerNameEx(playerid));
  139. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  140. RemovePlayerWeapon(playerid, 22);
  141. if(IsACop(playerid)) return 1;
  142. new Float:X,Float:Y,Float:Z;
  143. GetPlayerPos(playerid, X, Y, Z);
  144. new GunID = 22;
  145. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  146. }
  147. else
  148. {
  149. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  150. }
  151. }
  152. else if(strcmp(params, "shotgun", true) == 0)
  153. {
  154. if(PlayerInfo[playerid][pGuns][ 3 ] == 25)
  155. {
  156. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo shotgun.");
  157. format(string, sizeof(string), "* %s da vut bo shotgun.", GetPlayerNameEx(playerid));
  158. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  159. RemovePlayerWeapon(playerid, 25);
  160. if(IsACop(playerid)) return 1;
  161. new Float:X,Float:Y,Float:Z;
  162. GetPlayerPos(playerid, X, Y, Z);
  163. new GunID = 25;
  164. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  165. }
  166. else
  167. {
  168. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  169. }
  170. }
  171. else if(strcmp(params, "mp5", true) == 0)
  172. {
  173. if(PlayerInfo[playerid][pGuns][ 4 ] == 29)
  174. {
  175. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo MP5.");
  176. format(string, sizeof(string), "* %s da vut bo MP5.", GetPlayerNameEx(playerid));
  177. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  178. RemovePlayerWeapon(playerid, 29);
  179. if(IsACop(playerid)) return 1;
  180. new Float:X,Float:Y,Float:Z;
  181. GetPlayerPos(playerid, X, Y, Z);
  182. new GunID = 29;
  183. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  184. }
  185. else
  186. {
  187. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  188. }
  189. }
  190. else if(strcmp(params, "uzi", true) == 0)
  191. {
  192. if(PlayerInfo[playerid][pGuns][ 4 ] == 28)
  193. {
  194. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Micro SMG.");
  195. format(string, sizeof(string), "* %s da vut bo Micro SMG.", GetPlayerNameEx(playerid));
  196. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  197. RemovePlayerWeapon(playerid, 28);
  198. if(IsACop(playerid)) return 1;
  199. new Float:X,Float:Y,Float:Z;
  200. GetPlayerPos(playerid, X, Y, Z);
  201. new GunID = 28;
  202. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  203. }
  204. else
  205. {
  206. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  207. }
  208. }
  209. else if(strcmp(params, "uzi", true) == 0)
  210. {
  211. if(PlayerInfo[playerid][pGuns][ 4 ] == 32)
  212. {
  213. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Tec-9.");
  214. format(string, sizeof(string), "* %s da vut bo Tec-9.", GetPlayerNameEx(playerid));
  215. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  216. RemovePlayerWeapon(playerid, 32);
  217. if(IsACop(playerid)) return 1;
  218. new Float:X,Float:Y,Float:Z;
  219. GetPlayerPos(playerid, X, Y, Z);
  220. new GunID = 32;
  221. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  222. }
  223. else
  224. {
  225. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  226. }
  227. }
  228. else if(strcmp(params, "deagle", true) == 0)
  229. {
  230. if(PlayerInfo[playerid][pGuns][ 2 ] == 24)
  231. {
  232. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo Desert Eagle.");
  233. format(string, sizeof(string), "* %s da vut bo Desert Eagle.", GetPlayerNameEx(playerid));
  234. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  235. RemovePlayerWeapon(playerid, 24);
  236. if(IsACop(playerid)) return 1;
  237. new Float:X,Float:Y,Float:Z;
  238. GetPlayerPos(playerid, X, Y, Z);
  239. new GunID = 24;
  240. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  241. }
  242. else
  243. {
  244. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  245. }
  246. }
  247. else if(strcmp(params, "rifle", true) == 0)
  248. {
  249. if(PlayerInfo[playerid][pGuns][ 6 ] == 33)
  250. {
  251. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo rifle.");
  252. format(string, sizeof(string), "* %s da vut bo rifle.", GetPlayerNameEx(playerid));
  253. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  254. RemovePlayerWeapon(playerid, 33);
  255. if(IsACop(playerid)) return 1;
  256. new Float:X,Float:Y,Float:Z;
  257. GetPlayerPos(playerid, X, Y, Z);
  258. new GunID = 33;
  259. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  260. }
  261. else
  262. {
  263. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  264. }
  265. }
  266. else if(strcmp(params, "ak47", true) == 0)
  267. {
  268. if(PlayerInfo[playerid][pGuns][ 5 ] == 30)
  269. {
  270. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo AK-47.");
  271. format(string, sizeof(string), "* %s da vut bo AK-47.", GetPlayerNameEx(playerid));
  272. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  273. RemovePlayerWeapon(playerid, 30);
  274. if(IsACop(playerid)) return 1;
  275. new Float:X,Float:Y,Float:Z;
  276. GetPlayerPos(playerid, X, Y, Z);
  277. new GunID = 30;
  278. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  279. }
  280. else
  281. {
  282. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  283. }
  284. }
  285. else if(strcmp(params, "m4", true) == 0)
  286. {
  287. if(PlayerInfo[playerid][pGuns][ 5 ] == 31)
  288. {
  289. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo M4.");
  290. format(string, sizeof(string), "* %s da vut bo M4.", GetPlayerNameEx(playerid));
  291. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  292. RemovePlayerWeapon(playerid, 31);
  293. if(IsACop(playerid)) return 1;
  294. new Float:X,Float:Y,Float:Z;
  295. GetPlayerPos(playerid, X, Y, Z);
  296. new GunID = 31;
  297. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  298. }
  299. else
  300. {
  301. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  302. }
  303. }
  304. else if(strcmp(params, "spas12", true) == 0)
  305. {
  306. if(PlayerInfo[playerid][pGuns][ 3 ] == 27)
  307. {
  308. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo SPAS-12.");
  309. format(string, sizeof(string), "* %s da vut bo SPAS-12.", GetPlayerNameEx(playerid));
  310. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  311. RemovePlayerWeapon(playerid, 27);
  312. if(IsACop(playerid)) return 1;
  313. new Float:X,Float:Y,Float:Z;
  314. GetPlayerPos(playerid, X, Y, Z);
  315. new GunID = 27;
  316. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  317. }
  318. else
  319. {
  320. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  321. }
  322. }
  323. else if(strcmp(params, "flowers", true) == 0)
  324. {
  325. if(PlayerInfo[playerid][pGuns][ 10 ] == 14)
  326. {
  327. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo flowers.");
  328. format(string, sizeof(string), "* %s da vut bo flowers.", GetPlayerNameEx(playerid));
  329. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  330. RemovePlayerWeapon(playerid, 14);
  331. if(IsACop(playerid)) return 1;
  332. new Float:X,Float:Y,Float:Z;
  333. GetPlayerPos(playerid, X, Y, Z);
  334. new GunID = 14;
  335. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  336. }
  337. else
  338. {
  339. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  340. }
  341. }
  342. else if(strcmp(params, "knuckles", true) == 0)
  343. {
  344. if(PlayerInfo[playerid][pGuns][ 0 ] == 1)
  345. {
  346. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo brass knuckles.");
  347. format(string, sizeof(string), "* %s da vut bo brass knuckles.", GetPlayerNameEx(playerid));
  348. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  349. RemovePlayerWeapon(playerid, 1);
  350. if(IsACop(playerid)) return 1;
  351. new Float:X,Float:Y,Float:Z;
  352. GetPlayerPos(playerid, X, Y, Z);
  353. new GunID = 1;
  354. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  355. }
  356. else
  357. {
  358. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  359. }
  360. }
  361. else if(strcmp(params, "baseballbat", true) == 0)
  362. {
  363. if(PlayerInfo[playerid][pGuns][ 1 ] == 5)
  364. {
  365. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo baseball bat.");
  366. format(string, sizeof(string), "* %s da vut bo baseball bat.", GetPlayerNameEx(playerid));
  367. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  368. RemovePlayerWeapon(playerid, 5);
  369. if(IsACop(playerid)) return 1;
  370. new Float:X,Float:Y,Float:Z;
  371. GetPlayerPos(playerid, X, Y, Z);
  372. new GunID = 5;
  373. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  374. }
  375. else
  376. {
  377. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  378. }
  379. }
  380. else if(strcmp(params, "cane", true) == 0)
  381. {
  382. if(PlayerInfo[playerid][pGuns][ 10 ] == 15)
  383. {
  384. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo cane.");
  385. format(string, sizeof(string), "* %s da vut bo cane.", GetPlayerNameEx(playerid));
  386. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  387. PlayerInfo[playerid][pGuns][ 10 ] = 0;
  388. RemovePlayerWeapon(playerid, 15);
  389. if(IsACop(playerid)) return 1;
  390. new Float:X,Float:Y,Float:Z;
  391. GetPlayerPos(playerid, X, Y, Z);
  392. new GunID = 15;
  393. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  394. }
  395. else
  396. {
  397. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  398. }
  399. }
  400. else if(strcmp(params, "shovel", true) == 0)
  401. {
  402. if(PlayerInfo[playerid][pGuns][ 1 ] == 6)
  403. {
  404. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo shovel.");
  405. format(string, sizeof(string), "* %s da vut bo shovel.", GetPlayerNameEx(playerid));
  406. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  407. RemovePlayerWeapon(playerid, 6);
  408. if(IsACop(playerid)) return 1;
  409. new Float:X,Float:Y,Float:Z;
  410. GetPlayerPos(playerid, X, Y, Z);
  411. new GunID = 6;
  412. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  413. }
  414. else
  415. {
  416. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  417. }
  418. }
  419. else if(strcmp(params, "golfclub", true) == 0)
  420. {
  421. if(PlayerInfo[playerid][pGuns][ 1 ] == 2)
  422. {
  423. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo golf club.");
  424. format(string, sizeof(string), "* %s da vut bo golf club.", GetPlayerNameEx(playerid));
  425. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  426. RemovePlayerWeapon(playerid, 2);
  427. if(IsACop(playerid)) return 1;
  428. new Float:X,Float:Y,Float:Z;
  429. GetPlayerPos(playerid, X, Y, Z);
  430. new GunID = 2;
  431. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  432. }
  433. else
  434. {
  435. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  436. }
  437. }
  438. else if(strcmp(params, "katana") == 0)
  439. {
  440. if(PlayerInfo[playerid][pGuns][ 1 ] == 8)
  441. {
  442. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo katana.");
  443. format(string, sizeof(string), "* %s da vut bo katana.", GetPlayerNameEx(playerid));
  444. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  445. RemovePlayerWeapon(playerid, 8);
  446. if(IsACop(playerid)) return 1;
  447. new Float:X,Float:Y,Float:Z;
  448. GetPlayerPos(playerid, X, Y, Z);
  449. new GunID = 8;
  450. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  451. }
  452. else
  453. {
  454. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  455. }
  456. }
  457. else if(strcmp(params, "dildo", true) == 0)
  458. {
  459. if(PlayerInfo[playerid][pGuns][ 10 ] == 10)
  460. {
  461. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo dildo.");
  462. format(string, sizeof(string), "* %s da vut bo dildo.", GetPlayerNameEx(playerid));
  463. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  464. RemovePlayerWeapon(playerid, 10);
  465. if(IsACop(playerid)) return 1;
  466. new Float:X,Float:Y,Float:Z;
  467. GetPlayerPos(playerid, X, Y, Z);
  468. new GunID = 10;
  469. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  470. }
  471. else
  472. {
  473. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  474. }
  475. }
  476. else if(strcmp(params, "parachute", true) == 0)
  477. {
  478. if(PlayerInfo[playerid][pGuns][ 11 ] == 46)
  479. {
  480. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo parachute.");
  481. format(string, sizeof(string), "* %s da vut bo parachute.", GetPlayerNameEx(playerid));
  482. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  483. RemovePlayerWeapon(playerid, 46);
  484. if(IsACop(playerid)) return 1;
  485. new Float:X,Float:Y,Float:Z;
  486. GetPlayerPos(playerid, X, Y, Z);
  487. new GunID = 46;
  488. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  489. }
  490. else
  491. {
  492. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  493. }
  494. }
  495. else if(strcmp(params, "smoke", true) == 0)
  496. {
  497. if(PlayerInfo[playerid][pGuns][ 8 ] == 17)
  498. {
  499. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo smoke grenade.");
  500. format(string, sizeof(string), "* %s da vut bo smoke grenade.", GetPlayerNameEx(playerid));
  501. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  502. RemovePlayerWeapon(playerid, 17);
  503. if(IsACop(playerid)) return 1;
  504. new Float:X,Float:Y,Float:Z;
  505. GetPlayerPos(playerid, X, Y, Z);
  506. new GunID = 17;
  507. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  508. }
  509. else
  510. {
  511. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  512. }
  513. }
  514. else if(strcmp(params, "chainsaw", true) == 0)
  515. {
  516. if(PlayerInfo[playerid][pGuns][ 1 ] == 9)
  517. {
  518. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo chainsaw.");
  519. format(string, sizeof(string), "* %s da vut bo chainsaw.", GetPlayerNameEx(playerid));
  520. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  521. RemovePlayerWeapon(playerid, 9);
  522. if(IsACop(playerid)) return 1;
  523. new Float:X,Float:Y,Float:Z;
  524. GetPlayerPos(playerid, X, Y, Z);
  525. new GunID = 9;
  526. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  527. }
  528. else
  529. {
  530. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  531. }
  532. }
  533. else if(strcmp(params, "fire", true) == 0)
  534. {
  535. if(PlayerInfo[playerid][pGuns][ 9 ] == 42)
  536. {
  537. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo fire extinguisher.");
  538. format(string, sizeof(string), "* %s da vut bo fire extinguisher.", GetPlayerNameEx(playerid));
  539. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  540. RemovePlayerWeapon(playerid, 42);
  541. if(IsACop(playerid)) return 1;
  542. new Float:X,Float:Y,Float:Z;
  543. GetPlayerPos(playerid, X, Y, Z);
  544. new GunID = 42;
  545. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  546. }
  547. else
  548. {
  549. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  550. }
  551. }
  552. else if(strcmp(params, "minigun", true) == 0)
  553. {
  554. if(PlayerInfo[playerid][pGuns][ 7 ] == 38)
  555. {
  556. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo minigun.");
  557. format(string, sizeof(string), "* %s da vut bo minigun.", GetPlayerNameEx(playerid));
  558. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  559. RemovePlayerWeapon(playerid, 38);
  560. if(IsACop(playerid)) return 1;
  561. new Float:X,Float:Y,Float:Z;
  562. GetPlayerPos(playerid, X, Y, Z);
  563. new GunID = 38;
  564. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  565. }
  566. else
  567. {
  568. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  569. }
  570. }
  571. else if(strcmp(params, "poolcue", true) == 0)
  572. {
  573. if(PlayerInfo[playerid][pGuns][ 1 ] == 7)
  574. {
  575. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da vut bo pool cue.");
  576. format(string, sizeof(string), "* %s da vut bo pool cue.", GetPlayerNameEx(playerid));
  577. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  578. RemovePlayerWeapon(playerid, 7);
  579. if(IsACop(playerid)) return 1;
  580. new Float:X,Float:Y,Float:Z;
  581. GetPlayerPos(playerid, X, Y, Z);
  582. new GunID = 7;
  583. DropGun(playerid, GunID,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
  584. }
  585. else
  586. {
  587. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong co loai vu khi do!");
  588. }
  589. }
  590. else
  591. {
  592. SendClientMessageEx(playerid, COLOR_GRAD1, "Ten vu khi khong hop le.");
  593. }
  594. return 1;
  595. }
  596. ///////////////////////////////////////// Nhat Sung /////////////////////////////////////////////////
  597. CMD:nhatsung(playerid, params[])
  598. {
  599. if(GetPVarInt(playerid, "IsInArena") >= 0)
  600. {
  601. SendClientMessageEx(playerid, COLOR_WHITE, "Ban khong the lam viec do bay gio, ban dang trong arena!");
  602. return 1;
  603. }
  604. if(GetPVarInt( playerid, "EventToken") != 0)
  605. {
  606. SendClientMessageEx(playerid, COLOR_GREY, "Ban khong the lam dieu nay khi dang trong event.");
  607. return 1;
  608. }
  609. new Float:health;
  610. GetPlayerHealth(playerid, health);
  611. if (health < 20)
  612. {
  613. SendClientMessageEx(playerid, COLOR_GRAD1, "Ban khong the nhat sung khi mau nho hon 20!");
  614. return 1;
  615. }
  616.  
  617. if(GetPVarInt(playerid, "Injured") != 0||PlayerCuffed[playerid]!=0||PlayerInfo[playerid][pHospital]!=0||GetPlayerState(playerid) == 7)
  618. {
  619. SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the lam dieu do bay gio.");
  620. return 1;
  621. }
  622. if(IsPlayerInAnyVehicle(playerid))
  623. {
  624. SendClientMessageEx (playerid, COLOR_GRAD2, "Ban khong the dua sung trong xe!");
  625. return 1;
  626. }
  627. if(PlayerInfo[playerid][pLawyerFreeTime] > 1)
  628. {
  629. SendClientMessage(playerid, COLOR_LIGHTRED, "Ban can phai doi 10s tu lan chuyen doi vu khi de co the tiep tuc nhat sung sung!");
  630. return 1;
  631. }
  632. if (GetPVarInt(playerid, "GiveWeaponTimer") > 0)
  633. {
  634. new string[58];
  635. format(string, sizeof(string), "Ban phai cho %d giay truoc khi tiep tuc nhat sung.", GetPVarInt(playerid, "GiveWeaponTimer"));
  636. SendClientMessageEx(playerid,COLOR_GREY,string);
  637. return 1;
  638. }
  639. for(new i = 0; i < sizeof(DropInfo); i++)
  640. {
  641. if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ]))
  642. {
  643. if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld])
  644. {
  645. DestroyDynamicObject(DropObject[i]);
  646. DropInfo[i][DropGunPosX] = 0.0;
  647. DropInfo[i][DropGunPosY] = 0.0;
  648. DropInfo[i][DropGunPosZ] = 0.0;
  649. GivePlayerValidWeapon(playerid, DropInfo[i][DropGunModel], 60000);
  650. new string3[128];
  651. format(string3, sizeof(string3), "* %s da nhat sung tu duoi dat len.", GetPlayerNameEx(playerid));
  652. ProxDetector(15.0, playerid, string3, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  653. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  654. return 1;
  655. }
  656. }
  657. }
  658. return 1;
  659. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement