weapons.pwn 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Weapons System
  11. Next Generation Gaming, LLC
  12. (created by Next Generation Gaming Development Team)
  13. * Copyright (c) 2016, Next Generation Gaming, LLC
  14. *
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without modification,
  18. * are not permitted in any case.
  19. *
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  25. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. stock GetWeaponParam(id, WeaponsEnum: param)
  34. {
  35. for (new i; i < sizeof(Weapons); i++)
  36. {
  37. if (Weapons[i][WeaponId] == id) return Weapons[i][param];
  38. }
  39. return 0;
  40. }
  41. stock GivePlayerValidWeapon( playerid, WeaponID )
  42. {
  43. #if defined zombiemode
  44. if(zombieevent == 1 && GetPVarType(playerid, "pIsZombie")) return SendClientMessageEx(playerid, COLOR_GREY, "Zombies can't have guns.");
  45. #endif
  46. if(GetPVarType(playerid, "IsInArena") || GetPVarType(playerid, "EventToken")) {
  47. GivePlayerWeapon(playerid, WeaponID, 99999);
  48. return 1;
  49. }
  50. switch( WeaponID )
  51. {
  52. case 0, 1:
  53. {
  54. PlayerInfo[playerid][pGuns][ 0 ] = WeaponID;
  55. GivePlayerWeapon( playerid, WeaponID, 99999 );
  56. }
  57. case 2, 3, 4, 5, 6, 7, 8, 9:
  58. {
  59. PlayerInfo[playerid][pGuns][ 1 ] = WeaponID;
  60. GivePlayerWeapon( playerid, WeaponID, 99999 );
  61. }
  62. case 22, 23, 24:
  63. {
  64. PlayerInfo[playerid][pGuns][ 2 ] = WeaponID;
  65. GivePlayerWeapon( playerid, WeaponID, 99999 );
  66. }
  67. case 25, 26, 27:
  68. {
  69. PlayerInfo[playerid][pGuns][ 3 ] = WeaponID;
  70. GivePlayerWeapon( playerid, WeaponID, 99999 );
  71. }
  72. case 28, 29, 32:
  73. {
  74. PlayerInfo[playerid][pGuns][ 4 ] = WeaponID;
  75. GivePlayerWeapon( playerid, WeaponID, 99999 );
  76. }
  77. case 30, 31:
  78. {
  79. PlayerInfo[playerid][pGuns][ 5 ] = WeaponID;
  80. GivePlayerWeapon( playerid, WeaponID, 99999 );
  81. }
  82. case 33, 34:
  83. {
  84. PlayerInfo[playerid][pGuns][ 6 ] = WeaponID;
  85. GivePlayerWeapon( playerid, WeaponID, 99999 );
  86. }
  87. case 35, 36, 37, 38:
  88. {
  89. PlayerInfo[playerid][pGuns][ 7 ] = WeaponID;
  90. GivePlayerWeapon( playerid, WeaponID, 99999 );
  91. }
  92. case 16, 17, 18, 39, 40:
  93. {
  94. PlayerInfo[playerid][pGuns][ 8 ] = WeaponID;
  95. GivePlayerWeapon( playerid, WeaponID, 99999 );
  96. }
  97. case 41, 42, 43:
  98. {
  99. PlayerInfo[playerid][pGuns][ 9 ] = WeaponID;
  100. GivePlayerWeapon( playerid, WeaponID, 99999 );
  101. }
  102. case 10, 11, 12, 13, 14, 15:
  103. {
  104. PlayerInfo[playerid][pGuns][ 10 ] = WeaponID;
  105. GivePlayerWeapon( playerid, WeaponID, 99999 );
  106. }
  107. case 44, 45, 46:
  108. {
  109. PlayerInfo[playerid][pGuns][ 11 ] = WeaponID;
  110. GivePlayerWeapon( playerid, WeaponID, 99999 );
  111. }
  112. }
  113. GivePlayerWeapon(playerid, WeaponID, 1);
  114. return 1;
  115. }
  116. stock IsWeaponHandgun(weaponid) {
  117. switch(weaponid) {
  118. case 2..8: return true;
  119. case 10..24: return true;
  120. default: return false;
  121. }
  122. return false;
  123. }
  124. stock IsWeaponPrimary(weaponid) {
  125. switch(weaponid) {
  126. case 25..34: return true;
  127. default: return false;
  128. }
  129. return false;
  130. }
  131. forward SetPlayerWeapons(playerid);
  132. public SetPlayerWeapons(playerid)
  133. {
  134. if(HungerPlayerInfo[playerid][hgInEvent] == 1) { return 1;}
  135. if(GetPVarType(playerid, "IsInArena")) return 1;
  136. ResetPlayerWeapons(playerid);
  137. for(new s = 0; s < 12; s++)
  138. {
  139. if(PlayerInfo[playerid][pGuns][s] > 0 && PlayerInfo[playerid][pAGuns][s] == 0)
  140. {
  141. if(zombieevent) GivePlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][s]);
  142. else GivePlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][s]);
  143. }
  144. }
  145. return 1;
  146. }
  147. stock SetPlayerWeaponsEx(playerid)
  148. {
  149. if(GetPVarType(playerid, "IsInArena")) return 1;
  150. ResetPlayerWeapons(playerid);
  151. for(new s = 0; s < 12; s++)
  152. {
  153. if(PlayerInfo[playerid][pGuns][s] > 0)
  154. {
  155. if(zombieevent) GivePlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][s]);
  156. else GivePlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][s]);
  157. }
  158. }
  159. SetPlayerArmedWeapon(playerid, GetPVarInt(playerid, "LastWeapon"));
  160. return 1;
  161. }
  162. stock ResetPlayerWeaponsEx( playerid )
  163. {
  164. DeletePVar(playerid, "HidingKnife");
  165. ResetPlayerWeapons(playerid);
  166. PlayerInfo[playerid][pGuns][ 0 ] = 0;
  167. PlayerInfo[playerid][pGuns][ 1 ] = 0;
  168. PlayerInfo[playerid][pGuns][ 2 ] = 0;
  169. PlayerInfo[playerid][pGuns][ 3 ] = 0;
  170. PlayerInfo[playerid][pGuns][ 4 ] = 0;
  171. PlayerInfo[playerid][pGuns][ 5 ] = 0;
  172. PlayerInfo[playerid][pGuns][ 6 ] = 0;
  173. PlayerInfo[playerid][pGuns][ 7 ] = 0;
  174. PlayerInfo[playerid][pGuns][ 8 ] = 0;
  175. PlayerInfo[playerid][pGuns][ 9 ] = 0;
  176. PlayerInfo[playerid][pGuns][ 10 ] = 0;
  177. PlayerInfo[playerid][pGuns][ 11 ] = 0;
  178. PlayerInfo[playerid][pAGuns][ 0 ] = 0;
  179. PlayerInfo[playerid][pAGuns][ 1 ] = 0;
  180. PlayerInfo[playerid][pAGuns][ 2 ] = 0;
  181. PlayerInfo[playerid][pAGuns][ 3 ] = 0;
  182. PlayerInfo[playerid][pAGuns][ 4 ] = 0;
  183. PlayerInfo[playerid][pAGuns][ 5 ] = 0;
  184. PlayerInfo[playerid][pAGuns][ 6 ] = 0;
  185. PlayerInfo[playerid][pAGuns][ 7 ] = 0;
  186. PlayerInfo[playerid][pAGuns][ 8 ] = 0;
  187. PlayerInfo[playerid][pAGuns][ 9 ] = 0;
  188. PlayerInfo[playerid][pAGuns][ 10 ] = 0;
  189. PlayerInfo[playerid][pAGuns][ 11 ] = 0;
  190. return 1;
  191. }
  192. forward UnholsterWeapon(playerid, iWeaponSlot);
  193. public UnholsterWeapon(playerid, iWeaponSlot)
  194. {
  195. new string[128];
  196. if(iWeaponSlot == 0)
  197. {
  198. SetPVarInt(playerid, "WeaponsHolstered", 1);
  199. format(string, sizeof(string), "* %s holsters their weapon.", GetPlayerNameEx(playerid), ReturnWeaponName(PlayerInfo[playerid][pGuns][iWeaponSlot]));
  200. }
  201. else
  202. {
  203. SetPVarInt(playerid, "WeaponsHolstered", 0);
  204. format(string, sizeof(string), "* %s unholsters their %s.", GetPlayerNameEx(playerid), ReturnWeaponName(PlayerInfo[playerid][pGuns][iWeaponSlot]));
  205. }
  206. SetPlayerArmedWeapon(playerid, PlayerInfo[playerid][pGuns][iWeaponSlot]);
  207. PlayerInfo[playerid][pHolsteredWeapon] = iWeaponSlot;
  208. ProxDetector(4.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  209. return 1;
  210. }
  211. ReturnWeaponName(iWeaponID) {
  212. new
  213. szName[32];
  214. switch(iWeaponID) {
  215. case 0: szName = "fist";
  216. case 1: szName = "brass knuckles";
  217. case 2: szName = "golf club";
  218. case 3: szName = "nitestick";
  219. case 4: szName = "knife";
  220. case 5: szName = "baseball bat";
  221. case 6: szName = "shovel";
  222. case 7: szName = "pool cue";
  223. case 8: szName = "katana";
  224. case 9: szName = "chainsaw";
  225. case 10: szName = "purple dildo";
  226. case 11: szName = "white vibrator";
  227. case 12: szName = "white vibrator";
  228. case 13: szName = "silver vibrator";
  229. case 14: szName = "flowers";
  230. case 15: szName = "cane";
  231. case 16: szName = "grenade";
  232. case 17: szName = "tear gas";
  233. case 18: szName = "molotov cocktail";
  234. case 19: szName = "jetpack";
  235. case 20: szName = "";
  236. case 21: szName = "";
  237. case 22: szName = "Colt .45";
  238. case 23: szName = "silenced Colt .45";
  239. case 24: szName = "Desert Eagle";
  240. case 25: szName = "shotgun";
  241. case 26: szName = "sawn-off shotgun";
  242. case 27: szName = "SPAS-12";
  243. case 28: szName = "Micro Uzi";
  244. case 29: szName = "MP5";
  245. case 30: szName = "AK-47";
  246. case 31: szName = "M4A1";
  247. case 32: szName = "TEC-9";
  248. case 33: szName = "rifle";
  249. case 34: szName = "sniper rifle";
  250. case 35: szName = "RPG";
  251. case 36: szName = "heatseeker";
  252. case 37: szName = "flamethrower";
  253. case 38: szName = "minigun";
  254. case 39: szName = "satchel charge";
  255. case 40: szName = "detonator";
  256. case 41: szName = "spray can";
  257. case 42: szName = "fire extinguisher";
  258. case 43: szName = "camera";
  259. case 44: szName = "nightvision goggles";
  260. case 45: szName = "thermal goggles";
  261. case 46: szName = "parachute";
  262. }
  263. return szName;
  264. }
  265. GetWeaponSlot(iWeaponID) {
  266. switch(iWeaponID) {
  267. case 0, 1:
  268. return 0;
  269. case 2 .. 9:
  270. return 1;
  271. case 22 .. 24:
  272. return 2;
  273. case 25 .. 27:
  274. return 3;
  275. case 28, 29, 32:
  276. return 4;
  277. case 30, 31:
  278. return 5;
  279. case 33, 34:
  280. return 6;
  281. case 35 .. 38:
  282. return 7;
  283. case 16 .. 18, 39, 40:
  284. return 8;
  285. case 41 .. 43:
  286. return 9;
  287. case 10 .. 15:
  288. return 10;
  289. case 44 .. 46:
  290. return 11;
  291. }
  292. return -1;
  293. }
  294. OnPlayerChangeWeapon(playerid, newweapon)
  295. {
  296. if(pTazer{playerid} == 1) SetPlayerArmedWeapon(playerid,23);
  297. if(GetPVarInt(playerid, "WeaponsHolstered") == 1)
  298. {
  299. SetPlayerArmedWeapon(playerid, 0);
  300. }
  301. /*if(Weapon_ReturnSlot(newweapon) != PlayerInfo[playerid][pHolsteredWeapon])
  302. {
  303. SetPlayerArmedWeapon(playerid, PlayerInfo[playerid][pGuns][PlayerInfo[playerid][pHolsteredWeapon]]);
  304. }*/
  305. if(GetPVarType(playerid, "IsInArena"))
  306. {
  307. new a = GetPVarInt(playerid, "IsInArena");
  308. if(PaintBallArena[a][pbGameType] == 3)
  309. {
  310. if(PaintBallArena[a][pbFlagNoWeapons] == 1)
  311. {
  312. if(GetPVarInt(playerid, "AOSlotPaintballFlag") != -1)
  313. {
  314. SetPlayerArmedWeapon(playerid, 0);
  315. }
  316. }
  317. }
  318. }
  319. if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pASM] < 1)
  320. {
  321. if(HungerPlayerInfo[playerid][hgInEvent] != 0) return 1;
  322. if(GetPVarInt(playerid, "EventToken") != 0) return 1;
  323. if(GetPVarType(playerid, "IsInArena")) return 1;
  324. if(GetPlayerState(playerid) == PLAYER_STATE_NONE || GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_WASTED || GetPlayerState(playerid) == PLAYER_STATE_SPAWNED || GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return 1;
  325. if(newweapon == WEAPON_PARACHUTE) PlayerInfo[playerid][pGuns][11] = 46;
  326. if(PlayerInfo[playerid][pGuns][GetWeaponSlot(newweapon)] != newweapon) {
  327. SendClientMessageEx(playerid, COLOR_LIGHTRED, "[SYSTEM]: Client weapon detected. Admins were notified: refrain from doing it again.");
  328. ExecuteHackerAction(playerid, newweapon);
  329. SetPlayerWeaponsEx(playerid);
  330. new iWarnings = GetPVarInt(playerid, "WpnHack_Warnings");
  331. if(iWarnings > 3) {
  332. DeletePVar(playerid, "WpnHack_Warnings");
  333. KickEx(playerid);
  334. }
  335. else SetPVarInt(playerid, "WpnHack_Warnings", iWarnings+1);
  336. }
  337. /*
  338. if( PlayerInfo[playerid][pGuns][GetWeaponSlot(newweapon)] != newweapon) {
  339. new iWarnings = GetPVarInt(playerid, "WpnHack_Warnings");
  340. if(iWarnings > 3) {
  341. KickEx(playerid);
  342. DeletePVar(playerid, "WpnHack_Warnings");
  343. }
  344. else SetPVarInt(playerid, "WpnHack_Warnings", iWarnings+1);
  345. }*/
  346. }
  347. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  348. {
  349. if(!IsADriveByWeapon(GetPlayerWeapon(playerid)) && !IsADriveByWeapon(GetPVarInt(playerid, "LastWeapon"))) SetPlayerArmedWeapon(playerid,0);
  350. }
  351. return 1;
  352. }
  353. Weapon_ReturnName(iModelID) {
  354. new
  355. szWepName[32] = "(none)";
  356. switch(iModelID) {
  357. case 0: szWepName = "punch";
  358. case 1: szWepName = "Brass Knuckles";
  359. case 2: szWepName = "Golf Club";
  360. case 3: szWepName = "Nitestick";
  361. case 4: szWepName = "Knife";
  362. case 5: szWepName = "Baseball Bat";
  363. case 6: szWepName = "Shovel";
  364. case 7: szWepName = "Pool Cue";
  365. case 8: szWepName = "Katana";
  366. case 9: szWepName = "Chainsaw";
  367. case 10: szWepName = "Purple Dildo";
  368. case 11: szWepName = "Small White Vibrator";
  369. case 12: szWepName = "Large White Vibrator";
  370. case 13: szWepName = "Silver Vibrator";
  371. case 14: szWepName = "Bouquet of Flowers";
  372. case 15: szWepName = "Cane";
  373. case 16: szWepName = "Grenade";
  374. case 17: szWepName = "Tear Gas";
  375. case 18: szWepName = "Molotov Cocktail";
  376. case 19: szWepName = "Jetpack";
  377. case 20: szWepName = "";
  378. case 21: szWepName = "";
  379. case 22: szWepName = "Colt .45";
  380. case 23: szWepName = "Silenced Colt .45";
  381. case 24: szWepName = "Desert Eagle";
  382. case 25: szWepName = "Shotgun";
  383. case 26: szWepName = "Sawn-off Shotgun";
  384. case 27: szWepName = "SPAS-12";
  385. case 28: szWepName = "Micro Uzi";
  386. case 29: szWepName = "MP5";
  387. case 30: szWepName = "AK-47";
  388. case 31: szWepName = "M4A1";
  389. case 32: szWepName = "TEC-9";
  390. case 33: szWepName = "Rifle";
  391. case 34: szWepName = "Sniper Rifle";
  392. case 35: szWepName = "RPG";
  393. case 36: szWepName = "Heat Seeker";
  394. case 37: szWepName = "Flamethrower";
  395. case 38: szWepName = "Minigun";
  396. case 39: szWepName = "Satchel Charge";
  397. case 40: szWepName = "Detonator";
  398. case 41: szWepName = "Spray Can";
  399. case 42: szWepName = "Fire Extinguisher";
  400. case 43: szWepName = "Camera";
  401. case 44: szWepName = "Nightvision Goggles";
  402. case 45: szWepName = "Thermal Goggles";
  403. case 46: szWepName = "Parachute";
  404. case 47: szWepName = "";
  405. case 48: szWepName = "";
  406. case 49: szWepName = "Vehicle";
  407. case 50: szWepName = "Helicopter Blades";
  408. case 51: szWepName = "Explosion";
  409. case 52: szWepName = "";
  410. case 53: szWepName = "Drowning";
  411. case 54: szWepName = "Falling";
  412. }
  413. return szWepName;
  414. }
  415. IsNotAGun(weaponid)
  416. {
  417. switch(weaponid)
  418. {
  419. case 0: return true;
  420. case WEAPON_BAT: return true;
  421. case WEAPON_BRASSKNUCKLE: return true;
  422. case WEAPON_CAMERA: return true;
  423. case WEAPON_CANE: return true;
  424. case WEAPON_COLLISION: return true;
  425. case WEAPON_DILDO: return true;
  426. case WEAPON_DILDO2: return true;
  427. case WEAPON_DROWN: return true;
  428. case WEAPON_FIREEXTINGUISHER: return true;
  429. case WEAPON_FLOWER: return true;
  430. case WEAPON_GOLFCLUB: return true;
  431. case WEAPON_KATANA: return true;
  432. case WEAPON_KNIFE: return true;
  433. case WEAPON_NITESTICK: return true;
  434. case WEAPON_PARACHUTE: return true;
  435. case WEAPON_POOLSTICK: return true;
  436. case WEAPON_SHOVEL: return true;
  437. case WEAPON_SPRAYCAN: return true;
  438. case WEAPON_TEARGAS: return true;
  439. case WEAPON_VEHICLE: return true;
  440. case WEAPON_VIBRATOR: return true;
  441. case WEAPON_VIBRATOR2: return true;
  442. case WEAPON_GRENADE: return true;
  443. case WEAPON_CHAINSAW: return true;
  444. case WEAPON_MOLTOV: return true;
  445. case WEAPON_SATCHEL: return true;
  446. case 44, 45: return true;
  447. default: return false;
  448. }
  449. return 0;
  450. }
  451. CMD:myguns(playerid, params[])
  452. {
  453. new string[128], myweapons[13][2], weaponname[50], encryption[256], name[MAX_PLAYER_NAME];
  454. GetPlayerName(playerid, name, sizeof(name));
  455. SendClientMessageEx(playerid, COLOR_GREEN,"_______________________________________");
  456. format(string, sizeof(string), "Weapons on %s:", name);
  457. SendClientMessageEx(playerid, COLOR_WHITE, string);
  458. for (new i = 0; i < 13; i++)
  459. {
  460. GetPlayerWeaponData(playerid, i, myweapons[i][0], myweapons[i][1]);
  461. if(myweapons[i][0] > 0)
  462. {
  463. if(PlayerInfo[playerid][pGuns][i] == myweapons[i][0])
  464. {
  465. GetWeaponName(myweapons[i][0], weaponname, sizeof(weaponname));
  466. format(string, sizeof(string), "%s (%d)", weaponname, myweapons[i][0]);
  467. SendClientMessageEx(playerid, COLOR_GRAD1, string);
  468. format(encryption, sizeof(encryption), "%s%d", encryption, myweapons[i][0]);
  469. }
  470. }
  471. }
  472. new year, month, day;
  473. getdate(year, month, day);
  474. format(encryption, sizeof(encryption), "%s%s%d%d%d%d%d6524", encryption, name, month, day, year, hour, minuite);
  475. new encrypt = crc32(encryption);
  476. format(string, sizeof(string), "[%d/%d/%d %d:%d:%d] - [%d]", month, day, year, hour, minuite,second, encrypt);
  477. SendClientMessageEx(playerid, COLOR_GREEN, string);
  478. SendClientMessageEx(playerid, COLOR_GREEN,"_______________________________________");
  479. return 1;
  480. }
  481. CMD:switchgun(playerid, params[])
  482. {
  483. new weapon[16], id, weapons[13][2];
  484. if(sscanf(params, "s[16]", weapon))
  485. {
  486. SendClientMessageEx(playerid, COLOR_WHITE, "SYNTAX: /switchgun [weapon]");
  487. return SendClientMessageEx(playerid, COLOR_GREY, "Weapons: Fist, 9mm, Shotgun, Sawnoff, Spas12, UZI, MP5, M4, AK47, Tec9");
  488. }
  489. else
  490. {
  491. if(GetPVarInt(playerid, "Injured") || PlayerCuffed[playerid] > 0 || PlayerTied[playerid] > 0 || GetPVarInt(playerid, "IsInArena") || GetPVarInt(playerid, "EventToken") != 0 || PlayerInfo[playerid][pHospital] > 0) return SendClientMessageEx(playerid, -1, "You cannot do this right now!");
  492. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  493. {
  494. if(strcmp(weapon, "Fist", true) == 0) id = 0;
  495. else if(strcmp(weapon, "9mm", true) == 0) id = 22;
  496. else if(strcmp(weapon, "Shotgun", true) == 0) id = 25;
  497. else if(strcmp(weapon, "Sawnoff", true) == 0) id = 26;
  498. else if(strcmp(weapon, "Spas12", true) == 0) id = 27;
  499. else if(strcmp(weapon, "Uzi", true) == 0) id = 28;
  500. else if(strcmp(weapon, "Mp5", true) == 0) id = 29;
  501. else if(strcmp(weapon, "AK47", true) == 0) id = 30;
  502. else if(strcmp(weapon, "M4", true) == 0) id = 31;
  503. else if(strcmp(weapon, "Tec9", true) == 0) id = 32;
  504. else return SendClientMessageEx(playerid, COLOR_GREY, "Weapons: Fist, 9mm, Shotgun, Sawnoff, Spas12, UZI, MP5, M4, AK47, Tec9");
  505. for (new i = 0; i <= 12; i++)
  506. {
  507. GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
  508. if(PlayerInfo[playerid][pGuns][i] == id && weapons[i][0] == id)
  509. {
  510. SetPlayerArmedWeapon(playerid, id);
  511. SetPVarInt(playerid, "LastWeapon", id);
  512. return 1;
  513. }
  514. }
  515. return SendClientMessageEx(playerid, -1, "You do not have that weapon.");
  516. }
  517. else SendClientMessageEx(playerid, -1, "You can only do this as a passenger.");
  518. }
  519. return 1;
  520. }
  521. CMD:giveweapon(playerid, params[])
  522. {
  523. if(HungerPlayerInfo[playerid][hgInEvent] != 0) return SendClientMessageEx(playerid, COLOR_GREY, " You cannot do this while being in the Hunger Games Event!");
  524. if(GetPVarType(playerid, "IsInArena"))
  525. {
  526. SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in an arena!");
  527. return 1;
  528. }
  529. if(GetPVarInt( playerid, "EventToken") != 0)
  530. {
  531. SendClientMessageEx(playerid, COLOR_GREY, "You can't use this while you're in an event.");
  532. return 1;
  533. }
  534. new Float:health;
  535. GetHealth(playerid, health);
  536. if (health < 80)
  537. {
  538. SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give weapons if your health is below 80!");
  539. return 1;
  540. }
  541. if(GetPVarInt(playerid, "Injured") != 0||PlayerCuffed[playerid]!=0||PlayerInfo[playerid][pHospital]!=0||GetPlayerState(playerid) == 7)
  542. {
  543. SendClientMessageEx (playerid, COLOR_GRAD2, "You cannot do this at this time.");
  544. return 1;
  545. }
  546. if(IsPlayerInAnyVehicle(playerid))
  547. {
  548. SendClientMessageEx (playerid, COLOR_GRAD2, "You can not give weapons in a vehicle!");
  549. return 1;
  550. }
  551. if (GetPVarInt(playerid, "GiveWeaponTimer") > 0)
  552. {
  553. new string[58];
  554. format(string, sizeof(string), "You must wait %d seconds before giving another weapon.", GetPVarInt(playerid, "GiveWeaponTimer"));
  555. SendClientMessageEx(playerid,COLOR_GREY,string);
  556. return 1;
  557. }
  558. new string[128], giveplayerid, weapon[64];
  559. if(sscanf(params, "us[64]", giveplayerid, weapon))
  560. {
  561. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /giveweapon [player] [weapon name]");
  562. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: sdpistol, shotgun, 9mm, mp5, uzi, tec9, rifle, deagle, ak47, m4, spas12, sniper");
  563. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: flowers, knuckles, baseballbat, cane, shovel, poolcue, golfclub, katana, dildo, parachute");
  564. return 1;
  565. }
  566. if (!IsPlayerConnected(giveplayerid)) {
  567. return SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
  568. }
  569. if(IsPlayerInAnyVehicle(giveplayerid))
  570. {
  571. SendClientMessageEx (playerid, COLOR_GRAD2, "You can not give weapons to players in vehicles!");
  572. return 1;
  573. }
  574. if(giveplayerid == playerid)
  575. {
  576. SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give a weapon to yourself!");
  577. return 1;
  578. }
  579. if(!ProxDetectorS(3.0, playerid, giveplayerid))
  580. {
  581. SendClientMessageEx(playerid, COLOR_GREY, "That person isn't near you.");
  582. return 1;
  583. }
  584. if(PlayerInfo[playerid][pMember] != INVALID_GROUP_ID && arrGroupData[PlayerInfo[playerid][pMember]][g_iGroupType] != GROUP_TYPE_CRIMINAL && PlayerInfo[playerid][pMember] != PlayerInfo[giveplayerid][pMember])
  585. {
  586. SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give weapons to players outside your faction!");
  587. return 1;
  588. }
  589. if(PlayerInfo[giveplayerid][pConnectHours] < 2 || PlayerInfo[giveplayerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "That person is currently restricted from possessing weapons");
  590. if(IsPlayerInAnyVehicle(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Please exit the vehicle, before using this command.");
  591. if(strcmp(weapon, "sdpistol", true) == 0)
  592. {
  593. if(PlayerInfo[playerid][pGuns][ 2 ] == 23)
  594. {
  595. if(PlayerInfo[giveplayerid][pGuns][ 2 ] != 23 && PlayerInfo[giveplayerid][pGuns][ 2 ] != 24)
  596. {
  597. //if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  598. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your silenced pistol.");
  599. format(string, sizeof(string), "* %s has given %s their silenced pistol.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  600. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  601. RemovePlayerWeapon(playerid, 23);
  602. GivePlayerValidWeapon(giveplayerid, 23);
  603. /*new ip[32], ipex[32];
  604. GetPlayerIp(playerid, ip, sizeof(ip));
  605. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
  606. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s(IP:%s) has given %s (IP:%s) their silenced pistol.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  607. Log("logs/pay.log", string);*/
  608. }
  609. else
  610. {
  611. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a silenced pistol or Desert Eeagle!");
  612. }
  613. }
  614. else
  615. {
  616. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  617. }
  618. }
  619. if(strcmp(weapon, "9mm", true) == 0)
  620. {
  621. if(PlayerInfo[playerid][pGuns][ 2 ] == 22)
  622. {
  623. if(PlayerInfo[giveplayerid][pGuns][ 2 ] != 22 && PlayerInfo[giveplayerid][pGuns][ 2 ] != 24)
  624. {
  625. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your 9mm pistol.");
  626. format(string, sizeof(string), "* %s has given %s their 9mm pistol.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  627. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  628. RemovePlayerWeapon(playerid, 22);
  629. GivePlayerValidWeapon(giveplayerid, 22);
  630. /*new ip[32], ipex[32];
  631. GetPlayerIp(playerid, ip, sizeof(ip));
  632. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
  633. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their 9mm pistol.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  634. Log("logs/pay.log", string);*/
  635. }
  636. else
  637. {
  638. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a silenced pistol or Desert Eeagle!");
  639. }
  640. }
  641. else
  642. {
  643. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  644. }
  645. }
  646. else if(strcmp(weapon, "shotgun", true) == 0)
  647. {
  648. if(PlayerInfo[playerid][pGuns][ 3 ] == 25)
  649. {
  650. if(PlayerInfo[giveplayerid][pGuns][ 3 ] != 25 && PlayerInfo[giveplayerid][pGuns][ 3 ] != 27)
  651. {
  652. //if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  653. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your shotgun.");
  654. format(string, sizeof(string), "* %s has given %s their shotgun.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  655. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  656. RemovePlayerWeapon(playerid, 25);
  657. GivePlayerValidWeapon(giveplayerid, 25);
  658. /*new ip[32], ipex[32];
  659. GetPlayerIp(playerid, ip, sizeof(ip));
  660. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s(IP:%s) has given %s (IP:%s) their shotgun.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  661. Log("logs/pay.log", string);*/
  662. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  663. }
  664. else
  665. {
  666. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a MP5, Micro SMG or Tec-9!");
  667. }
  668. }
  669. else
  670. {
  671. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  672. }
  673. }
  674. else if(strcmp(weapon, "mp5", true) == 0)
  675. {
  676. if(PlayerInfo[playerid][pGuns][ 4 ] == 29)
  677. {
  678. if(PlayerInfo[giveplayerid][pGuns][ 4 ] != 28 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 29 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 32)
  679. {
  680. //if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  681. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your MP5.");
  682. format(string, sizeof(string), "* %s has given %s their MP5.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  683. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  684. RemovePlayerWeapon(playerid, 29);
  685. GivePlayerValidWeapon(giveplayerid, 29);
  686. /*new ip[32], ipex[32];
  687. GetPlayerIp(playerid, ip, sizeof(ip));
  688. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their MP5.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  689. Log("logs/pay.log", string);*/
  690. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  691. }
  692. else
  693. {
  694. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a MP5!");
  695. }
  696. }
  697. else
  698. {
  699. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  700. }
  701. }
  702. else if(strcmp(weapon, "uzi", true) == 0)
  703. {
  704. if(PlayerInfo[playerid][pGuns][ 4 ] == 28)
  705. {
  706. if(PlayerInfo[giveplayerid][pGuns][ 4 ] != 28 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 29 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 32)
  707. {
  708. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your Micro SMG.");
  709. format(string, sizeof(string), "* %s has given %s their Micro SMG.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  710. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  711. RemovePlayerWeapon(playerid, 28);
  712. GivePlayerValidWeapon(giveplayerid, 28);
  713. /*new ip[32], ipex[32];
  714. GetPlayerIp(playerid, ip, sizeof(ip));
  715. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their Micro SMG.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  716. Log("logs/pay.log", string);*/
  717. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  718. }
  719. else
  720. {
  721. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a MP5, Micro SMG or Tec-9!");
  722. }
  723. }
  724. else
  725. {
  726. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  727. }
  728. }
  729. else if(strcmp(weapon, "tec9", true) == 0)
  730. {
  731. if(PlayerInfo[playerid][pGuns][ 4 ] == 32)
  732. {
  733. if(PlayerInfo[giveplayerid][pGuns][ 4 ] != 28 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 29 && PlayerInfo[giveplayerid][pGuns][ 4 ] != 32)
  734. {
  735. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your Tec-9.");
  736. format(string, sizeof(string), "* %s has given %s their Tec-9.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  737. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  738. RemovePlayerWeapon(playerid, 32);
  739. GivePlayerValidWeapon(giveplayerid, 32);
  740. /*new ip[32], ipex[32];
  741. GetPlayerIp(playerid, ip, sizeof(ip));
  742. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their Tec-9.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  743. Log("logs/pay.log", string);*/
  744. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  745. }
  746. else
  747. {
  748. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a MP5, Micro SMG or Tec-9!");
  749. }
  750. }
  751. else
  752. {
  753. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  754. }
  755. }
  756. else if(strcmp(weapon, "deagle", true) == 0)
  757. {
  758. if(PlayerInfo[playerid][pGuns][ 2 ] == 24)
  759. {
  760. if(PlayerInfo[giveplayerid][pGuns][ 2 ] != 24)
  761. {
  762. //if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  763. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your Desert Eagle.");
  764. format(string, sizeof(string), "* %s has given %s their Desert Eagle.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  765. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  766. RemovePlayerWeapon(playerid, 24);
  767. GivePlayerValidWeapon(giveplayerid, 24);
  768. /*new ip[32], ipex[32];
  769. GetPlayerIp(playerid, ip, sizeof(ip));
  770. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their Desert Eagle.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  771. Log("logs/pay.log", string);*/
  772. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  773. }
  774. else
  775. {
  776. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a Desert Eeagle!");
  777. }
  778. }
  779. else
  780. {
  781. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  782. }
  783. }
  784. else if(strcmp(weapon, "rifle", true) == 0)
  785. {
  786. if(PlayerInfo[playerid][pGuns][ 6 ] == 33)
  787. {
  788. if(PlayerInfo[giveplayerid][pGuns][ 6 ] != 33 && PlayerInfo[giveplayerid][pGuns][ 6 ] != 34)
  789. {
  790. //if(PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away this weapon as you're Famed+!");
  791. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your rifle.");
  792. format(string, sizeof(string), "* %s has given %s their rifle.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  793. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  794. RemovePlayerWeapon(playerid, 33);
  795. GivePlayerValidWeapon(giveplayerid, 33);
  796. /*new ip[32], ipex[32];
  797. GetPlayerIp(playerid, ip, sizeof(ip));
  798. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their rifle.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  799. Log("logs/pay.log", string);*/
  800. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  801. }
  802. else
  803. {
  804. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a rifle!");
  805. }
  806. }
  807. else
  808. {
  809. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  810. }
  811. }
  812. else if(strcmp(weapon, "ak47", true) == 0)
  813. {
  814. if(PlayerInfo[playerid][pGuns][ 5 ] == 30)
  815. {
  816. if(PlayerInfo[giveplayerid][pGuns][ 5 ] != 30 && PlayerInfo[giveplayerid][pGuns][ 5 ] != 31)
  817. {
  818. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your AK-47.");
  819. format(string, sizeof(string), "* %s has given %s their AK-47.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  820. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  821. RemovePlayerWeapon(playerid, 30);
  822. GivePlayerValidWeapon(giveplayerid, 30);
  823. /*new ip[32], ipex[32];
  824. GetPlayerIp(playerid, ip, sizeof(ip));
  825. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their AK-47.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  826. Log("logs/pay.log", string);*/
  827. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  828. }
  829. else
  830. {
  831. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a AK-47 or M4!");
  832. }
  833. }
  834. else
  835. {
  836. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  837. }
  838. }
  839. else if(strcmp(weapon, "m4", true) == 0)
  840. {
  841. if(PlayerInfo[playerid][pGuns][ 5 ] == 31)
  842. {
  843. if(PlayerInfo[giveplayerid][pGuns][ 5 ] != 31)
  844. {
  845. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your M4.");
  846. format(string, sizeof(string), "* %s has given %s their M4.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  847. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  848. RemovePlayerWeapon(playerid, 31);
  849. GivePlayerValidWeapon(giveplayerid, 31);
  850. /*new ip[32], ipex[32];
  851. GetPlayerIp(playerid, ip, sizeof(ip));
  852. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their M4.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  853. Log("logs/pay.log", string);*/
  854. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  855. }
  856. else
  857. {
  858. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a M4!");
  859. }
  860. }
  861. else
  862. {
  863. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  864. }
  865. }
  866. else if(strcmp(weapon, "spas12", true) == 0)
  867. {
  868. if(PlayerInfo[playerid][pGuns][ 3 ] == 27)
  869. {
  870. if(PlayerInfo[giveplayerid][pGuns][ 3 ] != 27)
  871. {
  872. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your SPAS-12.");
  873. format(string, sizeof(string), "* %s has given %s their SPAS-12.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  874. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  875. RemovePlayerWeapon(playerid, 27);
  876. GivePlayerValidWeapon(giveplayerid, 27);
  877. /*new ip[32], ipex[32];
  878. GetPlayerIp(playerid, ip, sizeof(ip));
  879. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their SPAS-12.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  880. Log("logs/pay.log", string);*/
  881. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  882. }
  883. else
  884. {
  885. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a SPAS-12!");
  886. }
  887. }
  888. else
  889. {
  890. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  891. }
  892. }
  893. else if(strcmp(weapon, "sniper", true) == 0)
  894. {
  895. if(PlayerInfo[playerid][pGuns][ 6 ] == 34)
  896. {
  897. if(PlayerInfo[giveplayerid][pGuns][ 6 ] != 34)
  898. {
  899. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your sniper rifle.");
  900. format(string, sizeof(string), "* %s has given %s their sniper rifle.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  901. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  902. RemovePlayerWeapon(playerid, 34);
  903. GivePlayerValidWeapon(giveplayerid, 34);
  904. /*new ip[32], ipex[32];
  905. GetPlayerIp(playerid, ip, sizeof(ip));
  906. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their sniper rifle.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  907. Log("logs/pay.log", string);*/
  908. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  909. }
  910. else
  911. {
  912. SendClientMessageEx(playerid, COLOR_GREY, "That person already has a sniper rifle!");
  913. }
  914. }
  915. else
  916. {
  917. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  918. }
  919. }
  920. else if(strcmp(weapon, "flowers", true) == 0)
  921. {
  922. if(PlayerInfo[playerid][pGuns][ 10 ] == 14)
  923. {
  924. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your flowers.");
  925. format(string, sizeof(string), "* %s has given %s their flowers.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  926. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  927. RemovePlayerWeapon(playerid, 14);
  928. GivePlayerValidWeapon(giveplayerid, 14);
  929. /*new ip[32], ipex[32];
  930. GetPlayerIp(playerid, ip, sizeof(ip));
  931. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their flowers.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  932. Log("logs/pay.log", string);*/
  933. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  934. }
  935. else
  936. {
  937. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  938. }
  939. }
  940. else if(strcmp(weapon, "knuckles", true) == 0)
  941. {
  942. if(PlayerInfo[playerid][pGuns][ 0 ] == 1)
  943. {
  944. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your brass knuckles.");
  945. format(string, sizeof(string), "* %s has given %s their brass knuckles.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  946. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  947. RemovePlayerWeapon(playerid, 1);
  948. GivePlayerValidWeapon(giveplayerid, 1);
  949. /*new ip[32], ipex[32];
  950. GetPlayerIp(playerid, ip, sizeof(ip));
  951. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their brass knuckles.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  952. Log("logs/pay.log", string);*/
  953. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  954. }
  955. else
  956. {
  957. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  958. }
  959. }
  960. else if(strcmp(weapon, "baseballbat", true) == 0)
  961. {
  962. if(PlayerInfo[playerid][pGuns][ 1 ] == 5)
  963. {
  964. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your baseball bat.");
  965. format(string, sizeof(string), "* %s has given %s their baseball bat.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  966. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  967. RemovePlayerWeapon(playerid, 5);
  968. GivePlayerValidWeapon(giveplayerid, 5);
  969. /*new ip[32], ipex[32];
  970. GetPlayerIp(playerid, ip, sizeof(ip));
  971. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their baseball bat.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  972. Log("logs/pay.log", string);*/
  973. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  974. }
  975. else
  976. {
  977. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  978. }
  979. }
  980. else if(strcmp(weapon, "cane", true) == 0)
  981. {
  982. if(PlayerInfo[playerid][pGuns][ 10 ] == 15)
  983. {
  984. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your cane.");
  985. format(string, sizeof(string), "* %s has given %s their cane.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  986. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  987. RemovePlayerWeapon(playerid, 15);
  988. GivePlayerValidWeapon(giveplayerid, 15);
  989. /*new ip[32], ipex[32];
  990. GetPlayerIp(playerid, ip, sizeof(ip));
  991. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their cane.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  992. Log("logs/pay.log", string);*/
  993. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  994. }
  995. else
  996. {
  997. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  998. }
  999. }
  1000. else if(strcmp(weapon, "shovel", true) == 0)
  1001. {
  1002. if(PlayerInfo[playerid][pGuns][ 6 ] == 6)
  1003. {
  1004. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your shovel.");
  1005. format(string, sizeof(string), "* %s has given %s their shovel.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1006. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1007. RemovePlayerWeapon(playerid, 6);
  1008. GivePlayerValidWeapon(giveplayerid, 6);
  1009. /*new ip[32], ipex[32];
  1010. GetPlayerIp(playerid, ip, sizeof(ip));
  1011. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their shovel.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  1012. Log("logs/pay.log", string);*/
  1013. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  1014. }
  1015. else
  1016. {
  1017. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1018. }
  1019. }
  1020. else if(strcmp(weapon, "golfclub", true) == 0)
  1021. {
  1022. if(PlayerInfo[playerid][pGuns][ 1 ] == 2)
  1023. {
  1024. if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  1025. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your golf club.");
  1026. format(string, sizeof(string), "* %s has given %s golf club.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1027. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1028. RemovePlayerWeapon(playerid, 2);
  1029. GivePlayerValidWeapon(giveplayerid, 2);
  1030. /*new ip[32], ipex[32];
  1031. GetPlayerIp(playerid, ip, sizeof(ip));
  1032. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their golf club.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  1033. Log("logs/pay.log", string);*/
  1034. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  1035. }
  1036. else
  1037. {
  1038. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1039. }
  1040. }
  1041. else if(strcmp(weapon, "katana") == 0)
  1042. {
  1043. if(PlayerInfo[playerid][pGuns][ 1 ] == 8)
  1044. {
  1045. if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  1046. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your katana.");
  1047. format(string, sizeof(string), "* %s has given %s their katana.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1048. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1049. RemovePlayerWeapon(playerid, 8);
  1050. GivePlayerValidWeapon(giveplayerid, 8);
  1051. /*new ip[32], ipex[32];
  1052. GetPlayerIp(playerid, ip, sizeof(ip));
  1053. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their katana.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  1054. Log("logs/pay.log", string);*/
  1055. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  1056. }
  1057. else
  1058. {
  1059. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1060. }
  1061. }
  1062. else if(strcmp(weapon, "dildo", true) == 0)
  1063. {
  1064. if(PlayerInfo[playerid][pGuns][ 10 ] == 10)
  1065. {
  1066. if(PlayerInfo[playerid][pDonateRank] > 2 || PlayerInfo[playerid][pFamed] > 2) return SendClientMessageEx(playerid, COLOR_GRAD1, "You can not give away weapons if you're Gold+ VIP/Famed+!");
  1067. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your dildo.");
  1068. format(string, sizeof(string), "* %s has given %s their dildo.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1069. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1070. RemovePlayerWeapon(playerid, 10);
  1071. GivePlayerValidWeapon(giveplayerid, 10);
  1072. /*new ip[32], ipex[32];
  1073. GetPlayerIp(playerid, ip, sizeof(ip));
  1074. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their dildo.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  1075. Log("logs/pay.log", string);*/
  1076. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  1077. }
  1078. else
  1079. {
  1080. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1081. }
  1082. }
  1083. else if(strcmp(weapon, "parachute", true) == 0)
  1084. {
  1085. if(PlayerInfo[playerid][pGuns][ 11 ] == 46)
  1086. {
  1087. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have given away your parachute.");
  1088. format(string, sizeof(string), "* %s has given %s their parachute.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1089. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1090. RemovePlayerWeapon(playerid, 46);
  1091. GivePlayerValidWeapon(giveplayerid, 46);
  1092. /*new ip[32], ipex[32];
  1093. GetPlayerIp(playerid, ip, sizeof(ip));
  1094. GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
  1095. format(string, sizeof(string), "%s (IP:%s) has given %s (IP:%s) their parachute.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(giveplayerid), ipex);
  1096. Log("logs/pay.log", string);*/
  1097. SetPVarInt(playerid, "GiveWeaponTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_GIVEWEAPONTIMER);
  1098. }
  1099. else
  1100. {
  1101. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1102. }
  1103. }
  1104. else
  1105. {
  1106. SendClientMessageEx(playerid, COLOR_GRAD1, "You have entered an invalid weapon name.");
  1107. }
  1108. return 1;
  1109. }
  1110. CMD:dropgun(playerid, params[])
  1111. {
  1112. if(isnull(params))
  1113. {
  1114. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /dropgun [weapon name]");
  1115. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: sdpistol, shotgun, 9mm, mp5, uzi, tec9, rifle, deagle, ak47, m4, spas12, sniper, camera");
  1116. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: flowers, knuckles, baseballbat, cane, shovel, poolcue, golfclub, katana, dildo, parachute, goggles");
  1117. if (IsAHitman(playerid))
  1118. {
  1119. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: knife");
  1120. }
  1121. if(IsACop(playerid))
  1122. {
  1123. SendClientMessageEx(playerid, COLOR_GRAD2, "Available Names: nitestick, mace, smoke, chainsaw, fire");
  1124. }
  1125. return 1;
  1126. }
  1127. if(IsPlayerInAnyVehicle(playerid))
  1128. {
  1129. SendClientMessageEx (playerid, COLOR_GRAD2, "You can not drop weapons in a vehicle!");
  1130. return 1;
  1131. }
  1132. if(GetPVarType(playerid, "IsInArena"))
  1133. {
  1134. SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in an arena!");
  1135. return 1;
  1136. }
  1137. if(GetPVarInt( playerid, "EventToken") != 0)
  1138. {
  1139. SendClientMessageEx(playerid, COLOR_GREY, "You can't use this while you're in an event.");
  1140. return 1;
  1141. }
  1142. new string[128];
  1143. if(strcmp(params, "sdpistol", true) == 0)
  1144. {
  1145. if(PlayerInfo[playerid][pGuns][ 2 ] == 23)
  1146. {
  1147. if(pTazer{playerid} == 1) return SendClientMessageEx(playerid, COLOR_RED, "You cannot drop your tazer.");
  1148. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your silenced pistol.");
  1149. format(string, sizeof(string), "* %s has dropped their silenced pistol.", GetPlayerNameEx(playerid));
  1150. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1151. RemovePlayerWeapon(playerid, 23);
  1152. }
  1153. else
  1154. {
  1155. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1156. }
  1157. }
  1158. else if(strcmp(params, "camera", true) == 0)
  1159. {
  1160. if(PlayerInfo[playerid][pGuns][ 9 ] == 43)
  1161. {
  1162. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your camera.");
  1163. format(string, sizeof(string), "* %s has dropped their camera.", GetPlayerNameEx(playerid));
  1164. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1165. RemovePlayerWeapon(playerid, 43);
  1166. }
  1167. else
  1168. {
  1169. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1170. }
  1171. }
  1172. else if(strcmp(params, "nitestick", true) == 0)
  1173. {
  1174. if(PlayerInfo[playerid][pGuns][1] == 3)
  1175. {
  1176. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your nitestick.");
  1177. format(string, sizeof(string), "* %s has dropped their nitestick.", GetPlayerNameEx(playerid));
  1178. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1179. RemovePlayerWeapon(playerid, 3);
  1180. }
  1181. else
  1182. {
  1183. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1184. }
  1185. }
  1186. else if(strcmp(params, "mace", true) == 0)
  1187. {
  1188. if(PlayerInfo[playerid][pGuns][9] == 41)
  1189. {
  1190. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your mace.");
  1191. format(string, sizeof(string), "* %s has dropped their mace.", GetPlayerNameEx(playerid));
  1192. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1193. RemovePlayerWeapon(playerid, 41);
  1194. }
  1195. else
  1196. {
  1197. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1198. }
  1199. }
  1200. else if(strcmp(params, "knife", true) == 0)
  1201. {
  1202. if(PlayerInfo[playerid][pGuns][ 1 ] == 4)
  1203. {
  1204. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your knife.");
  1205. format(string, sizeof(string), "* %s has dropped their knife.", GetPlayerNameEx(playerid));
  1206. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1207. RemovePlayerWeapon(playerid, 4);
  1208. }
  1209. else
  1210. {
  1211. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1212. }
  1213. }
  1214. else if(strcmp(params, "9mm", true) == 0)
  1215. {
  1216. if(PlayerInfo[playerid][pGuns][ 2 ] == 22)
  1217. {
  1218. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your 9mm pistol.");
  1219. format(string, sizeof(string), "* %s has dropped their 9mm pistol.", GetPlayerNameEx(playerid));
  1220. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1221. RemovePlayerWeapon(playerid, 22);
  1222. }
  1223. else
  1224. {
  1225. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1226. }
  1227. }
  1228. else if(strcmp(params, "shotgun", true) == 0)
  1229. {
  1230. if(PlayerInfo[playerid][pGuns][ 3 ] == 25)
  1231. {
  1232. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your shotgun.");
  1233. format(string, sizeof(string), "* %s has dropped their shotgun.", GetPlayerNameEx(playerid));
  1234. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1235. RemovePlayerWeapon(playerid, 25);
  1236. }
  1237. else
  1238. {
  1239. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1240. }
  1241. }
  1242. else if(strcmp(params, "mp5", true) == 0)
  1243. {
  1244. if(PlayerInfo[playerid][pGuns][ 4 ] == 29)
  1245. {
  1246. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your MP5.");
  1247. format(string, sizeof(string), "* %s has dropped their MP5.", GetPlayerNameEx(playerid));
  1248. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1249. RemovePlayerWeapon(playerid, 29);
  1250. }
  1251. else
  1252. {
  1253. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1254. }
  1255. }
  1256. else if(strcmp(params, "uzi", true) == 0)
  1257. {
  1258. if(PlayerInfo[playerid][pGuns][ 4 ] == 28)
  1259. {
  1260. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your Micro SMG.");
  1261. format(string, sizeof(string), "* %s has dropped their Micro SMG.", GetPlayerNameEx(playerid));
  1262. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1263. RemovePlayerWeapon(playerid, 28);
  1264. }
  1265. else
  1266. {
  1267. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1268. }
  1269. }
  1270. else if(strcmp(params, "tec9", true) == 0)
  1271. {
  1272. if(PlayerInfo[playerid][pGuns][ 4 ] == 32)
  1273. {
  1274. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your Tec-9.");
  1275. format(string, sizeof(string), "* %s has dropped their Tec-9.", GetPlayerNameEx(playerid));
  1276. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1277. RemovePlayerWeapon(playerid, 32);
  1278. }
  1279. else
  1280. {
  1281. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1282. }
  1283. }
  1284. else if(strcmp(params, "deagle", true) == 0)
  1285. {
  1286. if(PlayerInfo[playerid][pGuns][ 2 ] == 24)
  1287. {
  1288. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your Desert Eagle.");
  1289. format(string, sizeof(string), "* %s has dropped their Desert Eagle.", GetPlayerNameEx(playerid));
  1290. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1291. RemovePlayerWeapon(playerid, 24);
  1292. }
  1293. else
  1294. {
  1295. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1296. }
  1297. }
  1298. else if(strcmp(params, "rifle", true) == 0)
  1299. {
  1300. if(PlayerInfo[playerid][pGuns][ 6 ] == 33)
  1301. {
  1302. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your rifle.");
  1303. format(string, sizeof(string), "* %s has dropped their rifle.", GetPlayerNameEx(playerid));
  1304. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1305. RemovePlayerWeapon(playerid, 33);
  1306. }
  1307. else
  1308. {
  1309. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1310. }
  1311. }
  1312. else if(strcmp(params, "ak47", true) == 0)
  1313. {
  1314. if(PlayerInfo[playerid][pGuns][ 5 ] == 30)
  1315. {
  1316. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your AK-47.");
  1317. format(string, sizeof(string), "* %s has dropped their AK-47.", GetPlayerNameEx(playerid));
  1318. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1319. RemovePlayerWeapon(playerid, 30);
  1320. }
  1321. else
  1322. {
  1323. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1324. }
  1325. }
  1326. else if(strcmp(params, "m4", true) == 0)
  1327. {
  1328. if(PlayerInfo[playerid][pGuns][ 5 ] == 31)
  1329. {
  1330. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your M4.");
  1331. format(string, sizeof(string), "* %s has dropped their M4.", GetPlayerNameEx(playerid));
  1332. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1333. RemovePlayerWeapon(playerid, 31);
  1334. }
  1335. else
  1336. {
  1337. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1338. }
  1339. }
  1340. else if(strcmp(params, "spas12", true) == 0)
  1341. {
  1342. if(PlayerInfo[playerid][pGuns][ 3 ] == 27)
  1343. {
  1344. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your SPAS-12.");
  1345. format(string, sizeof(string), "* %s has dropped their SPAS-12.", GetPlayerNameEx(playerid));
  1346. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1347. RemovePlayerWeapon(playerid, 27);
  1348. }
  1349. else
  1350. {
  1351. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1352. }
  1353. }
  1354. else if(strcmp(params, "sniper", true) == 0)
  1355. {
  1356. if(PlayerInfo[playerid][pGuns][ 6 ] == 34)
  1357. {
  1358. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your sniper rifle.");
  1359. format(string, sizeof(string), "* %s has dropped their sniper rifle.", GetPlayerNameEx(playerid));
  1360. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1361. RemovePlayerWeapon(playerid, 34);
  1362. }
  1363. else
  1364. {
  1365. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1366. }
  1367. }
  1368. else if(strcmp(params, "flowers", true) == 0)
  1369. {
  1370. if(PlayerInfo[playerid][pGuns][ 10 ] == 14)
  1371. {
  1372. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your flowers.");
  1373. format(string, sizeof(string), "* %s has dropped their flowers.", GetPlayerNameEx(playerid));
  1374. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1375. RemovePlayerWeapon(playerid, 14);
  1376. }
  1377. else
  1378. {
  1379. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1380. }
  1381. }
  1382. else if(strcmp(params, "knuckles", true) == 0)
  1383. {
  1384. if(PlayerInfo[playerid][pGuns][ 0 ] == 1)
  1385. {
  1386. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your brass knuckles.");
  1387. format(string, sizeof(string), "* %s has dropped their brass knuckles.", GetPlayerNameEx(playerid));
  1388. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1389. RemovePlayerWeapon(playerid, 1);
  1390. }
  1391. else
  1392. {
  1393. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1394. }
  1395. }
  1396. else if(strcmp(params, "baseballbat", true) == 0)
  1397. {
  1398. if(PlayerInfo[playerid][pGuns][ 1 ] == 5)
  1399. {
  1400. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your baseball bat.");
  1401. format(string, sizeof(string), "* %s has dropped their baseball bat.", GetPlayerNameEx(playerid));
  1402. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1403. RemovePlayerWeapon(playerid, 5);
  1404. }
  1405. else
  1406. {
  1407. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1408. }
  1409. }
  1410. else if(strcmp(params, "cane", true) == 0)
  1411. {
  1412. if(PlayerInfo[playerid][pGuns][ 10 ] == 15)
  1413. {
  1414. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your cane.");
  1415. format(string, sizeof(string), "* %s has dropped their cane.", GetPlayerNameEx(playerid));
  1416. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1417. PlayerInfo[playerid][pGuns][ 10 ] = 0;
  1418. RemovePlayerWeapon(playerid, 15);
  1419. }
  1420. else
  1421. {
  1422. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1423. }
  1424. }
  1425. else if(strcmp(params, "shovel", true) == 0)
  1426. {
  1427. if(PlayerInfo[playerid][pGuns][ 1 ] == 6)
  1428. {
  1429. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your shovel.");
  1430. format(string, sizeof(string), "* %s has dropped their shovel.", GetPlayerNameEx(playerid));
  1431. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1432. RemovePlayerWeapon(playerid, 6);
  1433. }
  1434. else
  1435. {
  1436. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1437. }
  1438. }
  1439. else if(strcmp(params, "golfclub", true) == 0)
  1440. {
  1441. if(PlayerInfo[playerid][pGuns][ 1 ] == 2)
  1442. {
  1443. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your golf club.");
  1444. format(string, sizeof(string), "* %s has dropped their golf club.", GetPlayerNameEx(playerid));
  1445. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1446. RemovePlayerWeapon(playerid, 2);
  1447. }
  1448. else
  1449. {
  1450. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1451. }
  1452. }
  1453. else if(strcmp(params, "katana") == 0)
  1454. {
  1455. if(PlayerInfo[playerid][pGuns][ 1 ] == 8)
  1456. {
  1457. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your katana.");
  1458. format(string, sizeof(string), "* %s has dropped their katana.", GetPlayerNameEx(playerid));
  1459. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1460. RemovePlayerWeapon(playerid, 8);
  1461. }
  1462. else
  1463. {
  1464. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1465. }
  1466. }
  1467. else if(strcmp(params, "dildo", true) == 0)
  1468. {
  1469. if(PlayerInfo[playerid][pGuns][ 10 ] == 10)
  1470. {
  1471. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your dildo.");
  1472. format(string, sizeof(string), "* %s has dropped their dildo.", GetPlayerNameEx(playerid));
  1473. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1474. RemovePlayerWeapon(playerid, 10);
  1475. }
  1476. else
  1477. {
  1478. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1479. }
  1480. }
  1481. else if(strcmp(params, "parachute", true) == 0)
  1482. {
  1483. if(PlayerInfo[playerid][pGuns][ 11 ] == 46)
  1484. {
  1485. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your parachute.");
  1486. format(string, sizeof(string), "* %s has dropped their parachute.", GetPlayerNameEx(playerid));
  1487. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1488. RemovePlayerWeapon(playerid, 46);
  1489. }
  1490. else
  1491. {
  1492. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1493. }
  1494. }
  1495. else if(strcmp(params, "smoke", true) == 0)
  1496. {
  1497. if(PlayerInfo[playerid][pGuns][ 8 ] == 17)
  1498. {
  1499. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your smoke grenade.");
  1500. format(string, sizeof(string), "* %s has dropped their smoke grenade.", GetPlayerNameEx(playerid));
  1501. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1502. RemovePlayerWeapon(playerid, 17);
  1503. }
  1504. else
  1505. {
  1506. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1507. }
  1508. }
  1509. else if(strcmp(params, "chainsaw", true) == 0)
  1510. {
  1511. if(PlayerInfo[playerid][pGuns][ 1 ] == 9)
  1512. {
  1513. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your chainsaw.");
  1514. format(string, sizeof(string), "* %s has dropped their chainsaw.", GetPlayerNameEx(playerid));
  1515. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1516. RemovePlayerWeapon(playerid, 9);
  1517. }
  1518. else
  1519. {
  1520. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1521. }
  1522. }
  1523. else if(strcmp(params, "fire", true) == 0)
  1524. {
  1525. if(PlayerInfo[playerid][pGuns][ 9 ] == 42)
  1526. {
  1527. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your fire extinguisher.");
  1528. format(string, sizeof(string), "* %s has dropped their fire extinguisher.", GetPlayerNameEx(playerid));
  1529. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1530. RemovePlayerWeapon(playerid, 42);
  1531. }
  1532. else
  1533. {
  1534. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1535. }
  1536. }
  1537. else if(strcmp(params, "minigun", true) == 0)
  1538. {
  1539. if(PlayerInfo[playerid][pGuns][ 7 ] == 38)
  1540. {
  1541. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your minigun.");
  1542. format(string, sizeof(string), "* %s has dropped their minigun.", GetPlayerNameEx(playerid));
  1543. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1544. RemovePlayerWeapon(playerid, 38);
  1545. }
  1546. else
  1547. {
  1548. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1549. }
  1550. }
  1551. else if(strcmp(params, "poolcue", true) == 0)
  1552. {
  1553. if(PlayerInfo[playerid][pGuns][ 1 ] == 7)
  1554. {
  1555. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your pool cue.");
  1556. format(string, sizeof(string), "* %s has dropped their pool cue.", GetPlayerNameEx(playerid));
  1557. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1558. RemovePlayerWeapon(playerid, 7);
  1559. }
  1560. else
  1561. {
  1562. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1563. }
  1564. }
  1565. else if(strcmp(params, "goggles", true) == 0)
  1566. {
  1567. if(PlayerInfo[playerid][pGuns][11] == 44 || PlayerInfo[playerid][pGuns][11] == 45)
  1568. {
  1569. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have dropped your goggles.");
  1570. format(string, sizeof(string), "* %s has dropped their goggles.", GetPlayerNameEx(playerid));
  1571. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1572. RemovePlayerWeapon(playerid, 44);
  1573. }
  1574. else
  1575. {
  1576. SendClientMessageEx(playerid, COLOR_GREY, "You do not have that weapon!");
  1577. }
  1578. }
  1579. else
  1580. {
  1581. SendClientMessageEx(playerid, COLOR_GRAD1, "You have entered an invalid weapon name.");
  1582. }
  1583. return 1;
  1584. }
  1585. CMD:holster(playerid, params[])
  1586. {
  1587. new string[128];
  1588. if(!GetPVarType(playerid, "WeaponsHolstered"))
  1589. {
  1590. SetPlayerArmedWeapon(playerid, 0);
  1591. SetPVarInt(playerid, "WeaponsHolstered", 1);
  1592. format(string, sizeof(string), "* %s holsters their weapon.", GetPlayerNameEx(playerid));
  1593. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1594. return 1;
  1595. }
  1596. else
  1597. {
  1598. if(GetPVarInt(playerid, "TackleMode") == 0)
  1599. {
  1600. DeletePVar(playerid, "WeaponsHolstered");
  1601. format(string, sizeof(string), "* %s unholsters their weapon.", GetPlayerNameEx(playerid));
  1602. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1603. return 1;
  1604. }
  1605. else
  1606. {
  1607. return SendClientMessageEx(playerid, COLOR_GRAD2, "You must disable tackling before unholstering");
  1608. }
  1609. }
  1610. }
  1611. ReturnBoneName(iBoneID)
  1612. {
  1613. new szBone[10];
  1614. switch(iBoneID)
  1615. {
  1616. case BODY_PART_TORSO: szBone = "torso";
  1617. case BODY_PART_GROIN: szBone = "groin";
  1618. case BODY_PART_HEAD: szBone = "head";
  1619. case BODY_PART_LEFT_ARM: szBone = "left arm";
  1620. case BODY_PART_RIGHT_ARM: szBone = "right arm";
  1621. case BODY_PART_LEFT_LEG: szBone = "left leg";
  1622. case BODY_PART_RIGHT_LEG: szBone = "right leg";
  1623. default: szBone = "";
  1624. }
  1625. return szBone;
  1626. }
  1627. IsADriveByWeapon(iWeaponID) {
  1628. switch(iWeaponID) {
  1629. case WEAPON_SHOTGSPA: return 1;
  1630. case WEAPON_SHOTGUN: return 1;
  1631. case WEAPON_SAWEDOFF: return 1;
  1632. case WEAPON_UZI: return 1;
  1633. case WEAPON_MP5: return 1;
  1634. case WEAPON_TEC9: return 1;
  1635. case WEAPON_AK47: return 1;
  1636. case WEAPON_M4: return 1;
  1637. case WEAPON_COLT45: return 1;
  1638. default: return 0;
  1639. }
  1640. return 0;
  1641. }