Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.48 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2. #include <amxmodx>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <hamsandwich>
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "author"
  9.  
  10. #pragma ctrlchar '\'
  11.  
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. register_clcmd("say /menu" , "stenudd")
  16. RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 0)
  17. }
  18.  
  19. public stenudd (id) {
  20. new menu = menu_create("\\yCS Shop! By Tobias" , "shop_handler")
  21. menu_additem(menu , "\\rBuy HE: \\w[$6000]")
  22. menu_additem(menu , "\\rBuy FLASH: \\w[$6000]")
  23. menu_additem(menu , "\\rBuy SMOKE: \\w[$6000]^n\\d Weapons!")
  24. menu_additem(menu , "\\rBuy AK47: \\w[$10000]")
  25. menu_additem(menu , "\\rBuy M4A1: \\w[$10000]")
  26. menu_additem(menu , "\\rBuy AWP: \\w[$12000]^n\\d Guns!")
  27. menu_additem(menu , "\\rBuy DEAGLE: \\w[$12000]")
  28. menu_display (id, menu, 1)
  29. menu_additem(menu , "\\rBuy GLOCK: \\w[$7000]")
  30. menu_additem(menu , "\\rBuy USP: \\w[$7000]^n\\d Items!")
  31. menu_additem(menu , "\\rBuy SPEED \\w[$8000]")
  32. menu_additem(menu , "\\rBuy SILENT WALK \\w[$4000]")
  33. menu_additem(menu, "\\rBuy SHIELD \\w[$3500]")
  34. menu_additem(menu, "\\rBuy LOW GRAVITY \\w[$4000]")
  35. menu_display (id, menu, 0)
  36. }
  37.  
  38. public shop_handler(id,menu,key) {
  39. if(key ==0) {
  40. if(cs_get_user_money(id) < 6000){
  41. client_print(id, print_chat, "Not enought money or this sorry :(")
  42. return PLUGIN_HANDLED
  43. }
  44. new name[32]
  45. get_user_name(id, name, 31)
  46. client_print(0, print_chat, "%s just bought %s", name, "a HE")
  47.  
  48.  
  49. give_item(id, "weapon_hegrenade")
  50. cs_set_user_money(id, cs_get_user_money(id) - 6000)
  51.  
  52. }
  53. else if(key == 1) {
  54. if(cs_get_user_money(id) < 6000){
  55. client_print(id, print_chat, "Not enought money or this sorry :(")
  56. return PLUGIN_HANDLED
  57. }
  58. new name[32]
  59. get_user_name(id, name, 31)
  60. client_print(0, print_chat, "%s just bought %s", name, "a FLASH")
  61. give_item(id, "weapon_flashbang")
  62. cs_set_user_money(id, cs_get_user_money(id) - 6000)
  63.  
  64. }
  65. else if(key == 3) {
  66.  
  67. if(cs_get_user_money(id) < 10000){
  68. client_print(id, print_chat, "Not enought money or this sorry :(")
  69. return PLUGIN_HANDLED
  70. }
  71. new name[32]
  72. get_user_name(id, name, 31)
  73. client_print(0, print_chat, "%s just bought %s", name, "an AK47")
  74. give_item(id, "weapon_ak47")
  75. give_item( id, "ammo_762nato")
  76. give_item( id, "ammo_762nato")
  77. give_item( id, "ammo_762nato")
  78. give_item( id, "ammo_762nato")
  79.  
  80. cs_set_user_money(id, cs_get_user_money(id) - 10000)
  81. }
  82. else if(key == 2) {
  83. if(cs_get_user_money(id) < 6000){
  84. client_print(id, print_chat, "Not enought money or this sorry :(")
  85. return PLUGIN_HANDLED
  86. }
  87. new name[32]
  88. get_user_name(id, name, 31)
  89. client_print(0, print_chat, "%s just bought %s", name, "a SMOKE")
  90. give_item(id, "weapon_smokegrenade")
  91. cs_set_user_money(id, cs_get_user_money(id) - 6000)
  92.  
  93. }
  94. else if(key == 6) {
  95. if(cs_get_user_money(id) < 12000){
  96. client_print(id, print_chat, "Not enought money or this sorry :(")
  97. return PLUGIN_HANDLED
  98. }
  99. new name[32]
  100. get_user_name(id, name, 31)
  101. client_print(0, print_chat, "%s just bought %s", name, "a DEAGLE")
  102. give_item(id, "weapon_deagle")
  103. give_item( id, "ammo_50ae")
  104. give_item( id, "ammo_50ae")
  105. give_item( id, "ammo_50ae")
  106. give_item( id, "ammo_50ae")
  107. give_item( id, "ammo_50ae")
  108.  
  109. cs_set_user_money(id, cs_get_user_money(id) - 12000)
  110.  
  111. }
  112. else if(key == 4) {
  113. if(cs_get_user_money(id) < 10000){
  114. client_print(id, print_chat, "Not enought money or this sorry :(")
  115. return PLUGIN_HANDLED
  116. }
  117. new name[32]
  118. get_user_name(id, name, 31)
  119. client_print(0, print_chat, "%s just bought %s", name, "a M4A1")
  120. give_item(id, "weapon_m4a1")
  121. give_item( id, "ammo_556nato")
  122. give_item( id, "ammo_556nato")
  123. give_item( id, "ammo_556nato")
  124. give_item( id, "ammo_556nato")
  125.  
  126. cs_set_user_money(id, cs_get_user_money(id) - 10000)
  127.  
  128. }
  129. else if(key == 7) {
  130. if(cs_get_user_money(id) < 7000){
  131. client_print(id, print_chat, "Not enought money or this sorry :(")
  132. return PLUGIN_HANDLED
  133. }
  134. new name[32]
  135. get_user_name(id, name, 31)
  136. client_print(0, print_chat, "%s just bought %s", name, "a GLOCK")
  137. give_item(id, "weapon_glock18")
  138. give_item( id, "ammo_9mm")
  139. give_item( id, "ammo_9mm")
  140. give_item( id, "ammo_9mm")
  141. give_item( id, "ammo_9mm")
  142. cs_set_user_money(id, cs_get_user_money(id) - 7000)
  143.  
  144. }
  145. else if(key == 8) {
  146. if(cs_get_user_money(id) < 7000){
  147. client_print(id, print_chat, "Not enought money or this sorry :(")
  148. return PLUGIN_HANDLED
  149. }
  150. new name[32]
  151. get_user_name(id, name, 31)
  152. client_print(0, print_chat, "%s just bought %s", name, "a USP")
  153. give_item(id, "weapon_usp")
  154. give_item( id, "ammo_45acp")
  155. give_item( id, "ammo_45acp")
  156. give_item( id, "ammo_45acp")
  157. give_item( id, "ammo_45acp")
  158. cs_set_user_money(id, cs_get_user_money(id) - 7000)
  159.  
  160. }
  161. else if(key == 5) {
  162. if(cs_get_user_money(id) < 7000){
  163. client_print(id, print_chat, "Not enought money or this sorry :(")
  164. return PLUGIN_HANDLED
  165. }
  166. new name[32]
  167. get_user_name(id, name, 31)
  168. client_print(0, print_chat, "%s just bought %s", name, "an AWP")
  169. give_item(id, "weapon_awp")
  170. give_item( id, "ammo_338magnum")
  171. give_item( id, "ammo_338magnum")
  172. give_item( id, "ammo_338magnum")
  173. give_item( id, "ammo_338magnum")
  174.  
  175. cs_set_user_money(id, cs_get_user_money(id) - 7000)
  176.  
  177. }
  178.  
  179. else if(key == 9) {
  180. if(cs_get_user_money(id) < 8000){
  181. client_print(id, print_chat, "Not enought money or this sorry :(")
  182. return PLUGIN_HANDLED
  183. }
  184. new name[32]
  185. get_user_name(id, name, 31)
  186. client_print(0, print_chat, "%s just bought %s", name, "a MAXSPEED")
  187. new Float:speed = get_user_maxspeed(id) + 85.0;
  188. set_user_maxspeed(id , speed);
  189. cs_set_user_money(id, cs_get_user_money(id) - 8000)
  190.  
  191. }
  192. else if(key == 10) {
  193. if(cs_get_user_money(id) < 4000){
  194. client_print(id, print_chat, "Not enought money or this sorry :(")
  195. return PLUGIN_HANDLED
  196. }
  197. new name[32]
  198. get_user_name(id, name, 31)
  199. client_print(0, print_chat, "%s just bought %s", name, "a FOOTSTEPS")
  200. set_user_footsteps (id, 1)
  201. cs_set_user_money(id, cs_get_user_money(id) - 4000)
  202.  
  203. }
  204. else if(key == 11) {
  205. if(cs_get_user_money(id) < 3500){
  206. client_print(id, print_chat, "Not enought money or this sorry :(")
  207. return PLUGIN_HANDLED
  208. }
  209. new name[32]
  210. get_user_name(id, name, 31)
  211. client_print(0, print_chat, "%s just bought %s", name, "a SHIELD")
  212. give_item(id, "weapon_shield")
  213. cs_set_user_money(id, cs_get_user_money(id) - 3500)
  214. }
  215. else if(key == 12) {
  216. if(cs_get_user_money(id) < 3500){
  217. client_print(id, print_chat, "Not enought money or this sorry :(")
  218. return PLUGIN_HANDLED
  219. }
  220. new name[32]
  221. get_user_name(id, name, 31)
  222. client_print(0, print_chat, "%s just bought %s", name, "a GRAVITY")
  223. set_user_gravity(id, 0.5)
  224. cs_set_user_money(id, cs_get_user_money(id) - 3500)
  225. }
  226.  
  227. }
  228.  
  229. public fwHamPlayerSpawnPost(iPlayer) {
  230. if (is_user_alive(iPlayer)) {
  231. set_user_footsteps(iPlayer, 0)
  232. }
  233. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement