MuhammadZeeshan

saddsadasd

May 27th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. else if ( cmd == "buywep" )
  2. {
  3. if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FFFFFF]You need to be a part of our community to use this command.", player );
  4. else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FFFFFF]You need to be identified to use this command.", player );
  5. else if (!text) ErrorMessage( "/"+cmd+" <Wep Name> Note: You can buy those weapons which are disallowed in /wep.", player );
  6. else
  7. {
  8. local Pos = player.Pos, checkpoly; checkpoly = InPoly( Pos.x, Pos.y, -682.759, 1201.86,-682.76, 1208.14,-666.617, 1209.52,-666.617, 1202.46);
  9. if( checkpoly == false ) ErrorMessage("You need to be at the ammunation shop in Downtown to buy weapons!", player );
  10. else
  11. {
  12. local wep = GetWeaponID(text), money = 0, ammo = 0;
  13. switch( wep )
  14. {
  15. case 30:
  16. money = 2000;
  17. ammo = 80;
  18. break;
  19.  
  20. case 100:
  21. money = 2000;
  22. ammo = 200;
  23. break;
  24.  
  25. case 101:
  26. money = 1000;
  27. ammo = 300;
  28. break;
  29.  
  30. case 102:
  31. money = 1000;
  32. ammo = 530;
  33. break;
  34.  
  35. case 103:
  36. money = 200;
  37. ammo = 500;
  38. break;
  39.  
  40. case 104:
  41. money = 250;
  42. ammo = 999;
  43. break;
  44.  
  45. case 105:
  46. money = 300;
  47. ammo = 103;
  48. break;
  49.  
  50. case 33:
  51. money = 2500;
  52. ammo = 1000;
  53. break;
  54.  
  55. case 15:
  56. money = 500;
  57. ammo = 100;
  58. break;
  59.  
  60. case 11:
  61. money = 100;
  62. ammo = 1;
  63. break;
  64.  
  65. case 12:
  66. money = 500;
  67. ammo = 100;
  68. break;
  69.  
  70. case 13:
  71. money = 500;
  72. ammo = 99;
  73. break;
  74.  
  75. case 14:
  76. money = 500;
  77. ammo = 100;
  78. break;
  79.  
  80. case 31:
  81. money = 1500;
  82. ammo = 1500;
  83. break;
  84.  
  85. case 28:
  86. money = 120;
  87. ammo = 50;
  88. break;
  89.  
  90. case 29:
  91. money = 200;
  92. ammo = 100;
  93. break;
  94.  
  95. default:
  96. ErrorMessage( "Sorry the weapon ("+ GetWepName(wep)+") you typed is incorrect or not in buy list use /wep for free weps.", player );
  97. }
  98. if ( status[ player.ID ].VIPLevel > 0 )
  99. {
  100. switch( wep )
  101. {
  102. case 30:
  103. money = 1000;
  104. ammo = 100;
  105. break;
  106.  
  107. case 100:
  108. money = 1500;
  109. ammo = 200;
  110. break;
  111.  
  112. case 101:
  113. money = 800;
  114. ammo = 300;
  115. break;
  116.  
  117. case 102:
  118. money = 1000;
  119. ammo = 999;
  120. break;
  121.  
  122. case 103:
  123. money = 200;
  124. ammo = 503;
  125. break;
  126.  
  127. case 104:
  128. money = 200;
  129. ammo = 999;
  130. break;
  131.  
  132. case 105:
  133. money = 250;
  134. ammo = 103;
  135. break;
  136.  
  137. case 33:
  138. money = 2000;
  139. ammo = 1000;
  140. break;
  141.  
  142. case 15:
  143. money = 1000;
  144. ammo = 100;
  145. break;
  146.  
  147. case 11:
  148. money = 100;
  149. ammo = 1;
  150. break;
  151.  
  152. case 12:
  153. money = 300;
  154. ammo = 100;
  155. break;
  156.  
  157. case 13:
  158. money = 500;
  159. ammo = 100;
  160. break;
  161.  
  162. case 14:
  163. money = 500;
  164. ammo = 100;
  165. break;
  166.  
  167. case 31:
  168. money = 1000;
  169. ammo = 1500;
  170. break;
  171.  
  172. case 28:
  173. money = 120;
  174. ammo = 60;
  175. break;
  176.  
  177. case 29:
  178. money = 200;
  179. ammo = 107;
  180. break;
  181.  
  182. default:
  183. }
  184. }
  185. if ( money != 0 && ammo != 0 )
  186. {
  187. if ( player.Cash >= money )
  188. {
  189. player.GiveWeapon(wep, ammo);
  190. player.Cash-=money;
  191. SendMessage( "[#0099ff]You have bought: "+GetWepName(wep)+", Cost: $"+money+", Ammos: "+ammo+".", player );
  192. }
  193. else ErrorMessage("You must have $" + money + " to buy "+GetWepName(wep)+", with ammos: " + ammo + ".", player );
  194. }
  195. }
  196. }
  197. }
Add Comment
Please, Sign In to add comment