Advertisement
Caped32

Bugged Fixed for master gaming

Aug 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.42 KB | None | 0 0
  1. CMD:order(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
  4. {
  5. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't do this right now.");
  6. if(IsPlayerInRangeOfPoint(playerid, 20.0, 1236.112182, -751.863220, 5080.765136))
  7. {
  8. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD2, "You can't use this as you're currently restricted from possessing weapons!");
  9. new Hitman[32], skin = -1;
  10. if(sscanf(params, "s[32]D", Hitman, skin))
  11. {
  12. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /order [name]");
  13. SendClientMessage(playerid, COLOR_GRAD2, " Rank 1: Knife ($80), SDPistol ($100), Shotgun ($150), Skin ($250), Deagle ($500), MP5 ($250), Kevlar Vest ($600)");
  14. SendClientMessage(playerid, COLOR_GRAD2, " Rank 2: Rifle ($300), AK47 ($1,000), M4 ($1,200)");
  15. SendClientMessage(playerid, COLOR_GRAD2, " Rank 3: SPAS12 ($3,500), Sniper ($3,500)");
  16. SendClientMessage(playerid, COLOR_GRAD2, " Rank 4: C4 ($5000)");
  17. return 1;
  18. }
  19. else if(strcmp(Hitman,"skin",true) == 0)
  20. {
  21. if(PlayerInfo[playerid][pRank] < 1) {
  22. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that!");
  23. }
  24. else if(IsInvalidSkin(skin)) {
  25. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /order skin [skin ID]");
  26. }
  27. else if(GetPlayerCash(playerid) >= 250) {
  28. SetPlayerSkin(playerid, skin);
  29. PlayerInfo[playerid][pSkin] = skin;
  30. GivePlayerCash(playerid, -250);
  31. SendClientMessage(playerid, COLOR_LIGHTBLUE,"You have purchased a skin!");
  32. }
  33. else SendClientMessage(playerid, COLOR_GREY," You can't afford that!");
  34. }
  35. else if(strcmp(Hitman,"Knife",true) == 0)
  36. {
  37. if(PlayerInfo[playerid][pRank] < 1)
  38. {
  39. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  40. return 1;
  41. }
  42. if(GetPlayerCash(playerid) >= 80)
  43. {
  44. GivePlayerValidWeapon(playerid, 4, 3);
  45. GivePlayerCash(playerid, -80);
  46. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a knife!");
  47. return 1;
  48. }
  49. else
  50. {
  51. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  52. return 1;
  53. }
  54. }
  55. else if(strcmp(Hitman,"SDPistol",true) == 0)
  56. {
  57. if(PlayerInfo[playerid][pRank] < 1)
  58. {
  59. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  60. return 1;
  61. }
  62. if(GetPlayerCash(playerid) >= 100)
  63. {
  64. GivePlayerValidWeapon(playerid, 23, 99999);
  65. GivePlayerCash(playerid, -100);
  66. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a silenced pistol!");
  67. return 1;
  68. }
  69. else
  70. {
  71. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  72. return 1;
  73. }
  74. }
  75. else if(strcmp(Hitman,"Shotgun",true) == 0)
  76. {
  77. if(PlayerInfo[playerid][pRank] < 1)
  78. {
  79. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  80. return 1;
  81. }
  82. if(GetPlayerCash(playerid) >= 150)
  83. {
  84. GivePlayerValidWeapon(playerid, 25, 99999);
  85. GivePlayerCash(playerid, -150);
  86. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a shotgun!");
  87. return 1;
  88. }
  89. else
  90. {
  91. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  92. return 1;
  93. }
  94. }
  95. else if(strcmp(Hitman,"Deagle",true) == 0)
  96. {
  97. if(PlayerInfo[playerid][pRank] < 1)
  98. {
  99. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  100. return 1;
  101. }
  102. if(GetPlayerCash(playerid) > 500)
  103. {
  104. GivePlayerValidWeapon(playerid, 24, 99999);
  105. GivePlayerCash(playerid, -500);
  106. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a Desert Eagle!");
  107. return 1;
  108. }
  109. else
  110. {
  111. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  112. return 1;
  113. }
  114. }
  115. else if(strcmp(Hitman,"MP5",true) == 0)
  116. {
  117. if(PlayerInfo[playerid][pRank] < 1)
  118. {
  119. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  120. return 1;
  121. }
  122. if(GetPlayerCash(playerid) >= 250)
  123. {
  124. GivePlayerValidWeapon(playerid, 29, 99999);
  125. GivePlayerCash(playerid, -250);
  126. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased an MP5!");
  127. return 1;
  128. }
  129. else
  130. {
  131. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  132. return 1;
  133. }
  134. }
  135. else if(strcmp(Hitman,"Rifle",true) == 0)
  136. {
  137. if(PlayerInfo[playerid][pRank] < 2)
  138. {
  139. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  140. return 1;
  141. }
  142. if(GetPlayerCash(playerid) >= 300)
  143. {
  144. GivePlayerValidWeapon(playerid, 33, 99999);
  145. GivePlayerCash(playerid, -300);
  146. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a rifle!");
  147. return 1;
  148. }
  149. else
  150. {
  151. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  152. return 1;
  153. }
  154. }
  155. else if(strcmp(Hitman,"AK47",true) == 0)
  156. {
  157. if(PlayerInfo[playerid][pRank] < 2)
  158. {
  159. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon (2+)!");
  160. return 1;
  161. }
  162. if(GetPlayerCash(playerid) >= 1000)
  163. {
  164. GivePlayerValidWeapon(playerid, 30, 99999);
  165. GivePlayerCash(playerid, -1000);
  166. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased an AK-47!");
  167. return 1;
  168. }
  169. else
  170. {
  171. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  172. return 1;
  173. }
  174. }
  175. else if(strcmp(Hitman,"M4",true) == 0)
  176. {
  177. if(PlayerInfo[playerid][pRank] < 2)
  178. {
  179. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon (2+)!");
  180. return 1;
  181. }
  182. if(GetPlayerCash(playerid) >= 1200)
  183. {
  184. GivePlayerValidWeapon(playerid, 31, 99999);
  185. GivePlayerCash(playerid, -1200);
  186. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased an M4!");
  187. return 1;
  188. }
  189. else
  190. {
  191. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  192. return 1;
  193. }
  194. }
  195. else if(strcmp(Hitman,"Vest",true) == 0)
  196. {
  197. if(PlayerInfo[playerid][pRank] < 1)
  198. {
  199. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon!");
  200. return 1;
  201. }
  202. if(GetPlayerCash(playerid) >= 600)
  203. {
  204. SetPlayerArmourEx(playerid, 100);
  205. GivePlayerCash(playerid, -600);
  206. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a kevlar vest!");
  207. return 1;
  208. }
  209. else
  210. {
  211. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  212. return 1;
  213. }
  214. }
  215. else if(strcmp(Hitman,"Spas12",true) == 0)
  216. {
  217. if(PlayerInfo[playerid][pRank] < 3)
  218. {
  219. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon (3+!");
  220. return 1;
  221. }
  222. if(GetPlayerCash(playerid) >= 3500)
  223. {
  224. GivePlayerValidWeapon(playerid, 27, 99999);
  225. GivePlayerCash(playerid, -3500);
  226. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a SPAS-12!");
  227. return 1;
  228. }
  229. else
  230. {
  231. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  232. return 1;
  233. }
  234. }
  235. else if(strcmp(Hitman,"Sniper",true) == 0)
  236. {
  237. if(PlayerInfo[playerid][pRank] < 3)
  238. {
  239. SendClientMessage(playerid, COLOR_GREY, "You're not the required rank for that weapon (3+)!");
  240. return 1;
  241. }
  242. if(GetPlayerCash(playerid) >= 3500)
  243. {
  244. GivePlayerValidWeapon(playerid, 34, 99999);
  245. GivePlayerCash(playerid, -3500);
  246. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased a sniper rifle!");
  247. return 1;
  248. }
  249. else
  250. {
  251. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  252. return 1;
  253. }
  254. }
  255. else if(strcmp(Hitman,"C4",true) == 0)
  256. {
  257. if(PlayerInfo[playerid][pRank] < 4)
  258. {
  259. SendClientMessage(playerid, COLOR_GREY, "YYou're not the required rank for that weapon (4+)!");
  260. return 1;
  261. }
  262. if(GetPlayerCash(playerid) >= 5000)
  263. {
  264. PlayerInfo[playerid][pC4Get] = 1;
  265. PlayerInfo[playerid][pBombs]++;
  266. GivePlayerCash(playerid, -5000);
  267. SendClientMessage(playerid, COLOR_LIGHTBLUE," You have purchased one block of C4!");
  268. }
  269. else
  270. {
  271. SendClientMessage(playerid, COLOR_GREY," You can't afford that package!");
  272. return 1;
  273. }
  274. }
  275. }
  276. else
  277. {
  278. SendClientMessage(playerid, COLOR_GRAD2, "You're not at the gun shack!");
  279. return 1;
  280. }
  281. }
  282. else
  283. {
  284. SendClientMessage(playerid, COLOR_GRAD2, "You're not a member of the hitman agency!");
  285. return 1;
  286. }
  287. return 1;
  288. }
  289.  
  290. CMD:f(playerid, params[]) {
  291. if(gFam[playerid] == 1)
  292. return SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have your family chat disabled; /togfamily!");
  293.  
  294. new string[128];
  295.  
  296. if(isnull(params))
  297. return SendClientMessage(playerid, COLOR_GREY, "USAGE: (/f)amily [family chat]");
  298.  
  299. if(PlayerCuffed[playerid] > 0 || GetPVarInt(playerid, "Injured") == 1)
  300. return SendClientMessage(playerid, COLOR_GREY, "You can't talk over /f while you're cuffed, hospitalized or tazed.");
  301.  
  302. if((PlayerInfo[playerid][pFaction] == 4) || PlayerInfo[playerid][pGang] < 255) {
  303. new member = PlayerInfo[playerid][pFaction];
  304. new fam = PlayerInfo[playerid][pGang];
  305. if(member==4) {
  306. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) Director %s: %s **", GetPlayerNameEx(playerid), params); }
  307. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) Vice Director %s: %s **", GetPlayerNameEx(playerid), params); }
  308. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) Special Agent %s: %s **", GetPlayerNameEx(playerid), params); }
  309. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) Agent %s: %s **", GetPlayerNameEx(playerid), params); }
  310. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) Marksman %s: %s **", GetPlayerNameEx(playerid), params); }
  311. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) Freelancer %s: %s **", GetPlayerNameEx(playerid), params); }
  312. else { format(string, sizeof(string), "** (1) Freelancer %s: %s **", GetPlayerNameEx(playerid), params); }
  313. SendFamilyMessage(PlayerInfo[playerid][pFaction], TEAM_AZTECAS_COLOR, string);
  314. }
  315. else if(PlayerInfo[playerid][pGang] < 255) {
  316. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) %s %s: %s **", FamilyInfo[fam][FamilyRank6], GetPlayerNameEx(playerid), params); }
  317. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) %s %s: %s **", FamilyInfo[fam][FamilyRank5], GetPlayerNameEx(playerid), params); }
  318. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) %s %s: %s **", FamilyInfo[fam][FamilyRank4], GetPlayerNameEx(playerid), params); }
  319. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) %s %s: %s **", FamilyInfo[fam][FamilyRank3], GetPlayerNameEx(playerid), params); }
  320. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) %s %s: %s **", FamilyInfo[fam][FamilyRank2], GetPlayerNameEx(playerid), params); }
  321. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) %s %s: %s **", FamilyInfo[fam][FamilyRank1], GetPlayerNameEx(playerid), params); }
  322. else { format(string, sizeof(string), "** (0) %s %s: %s **", FamilyInfo[fam][FamilyRank1], GetPlayerNameEx(playerid), params); }
  323. SendNewFamilyMessage(PlayerInfo[playerid][pGang], TEAM_AZTECAS_COLOR, string);
  324. }
  325. return 1;
  326. }
  327. else SendClientMessage(playerid, COLOR_GRAD2, "You're not a part of a Family!");
  328.  
  329. return 1;
  330. }
  331.  
  332. CMD:turfs(playerid, params[])
  333. {
  334. if(turfWarsRadar[playerid] == 0) {
  335. SendClientMessageEx(playerid, COLOR_WHITE, "You have enabled the Turf Minimap Radar.");
  336. ShowTurfWarsRadar(playerid);
  337. }
  338. else {
  339. SendClientMessageEx(playerid, COLOR_WHITE, "You have disabled the Turf Minimap Radar.");
  340. HideTurfWarsRadar(playerid);
  341. }
  342. return 1;
  343. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement