Advertisement
jicamacelaru

Untitled

Nov 18th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.51 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <fun>
  4. #include <engine>
  5. #include <hamsandwich>
  6.  
  7. new g_Menu;
  8. new bool:g_HasSpeed[ 33 ];
  9.  
  10. public plugin_init() {
  11. register_plugin("PredatorShop", "0.1", "Ex3cuTioN");
  12.  
  13. g_Menu = register_menuid("Predator Shop");
  14. register_menucmd(g_Menu, 1023, "predatorshop");
  15.  
  16. register_clcmd("say /shop","cmdShop",-1,"<cumperi diverse lucruri>");
  17.  
  18. register_event( "CurWeapon", "set_speed", "be" );
  19. RegisterHam(Ham_Spawn, "player", "Spawn", 1);
  20. }
  21.  
  22. public cmdShop(id) {
  23. new menuBody[512];
  24.  
  25. add(menuBody, 511, "\yPredator.Indungi.Ro Shop\w^n^n");
  26. add(menuBody, 511, "\r1. \wHE+2Flash (1100$)\w^n");
  27. add(menuBody, 511, "\r2. \wMachine Guns (5600$)\w^n");
  28. add(menuBody, 511, "\r3. \wViteza (5500$)\w^n");
  29. add(menuBody, 511, "\r4. \wGravitatie (11000$)\w^n");
  30. add(menuBody, 511, "\r5. \wInvizibilitate (14000$)\w^n");
  31. add(menuBody, 511, "\r6. \w50 HP (9000$)\w^n");
  32. add(menuBody, 511, "\r7. \w50 Armor (1500$)\w^n");
  33. add(menuBody, 511, "\r8. \w3 Kills (5000$)\w^n");
  34. add(menuBody, 511, "\r0. \wExit^n");
  35.  
  36. new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9);
  37. show_menu(id, keys, menuBody, -1, "Predator Shop");
  38. }
  39.  
  40. public drshop(id, key) {
  41. switch(key)
  42. {
  43. case 0:
  44. {
  45. new bani,banif;
  46. bani = cs_get_user_money(id);
  47. if(bani < 1100) {
  48. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 1100$");
  49. return PLUGIN_HANDLED;
  50. }
  51.  
  52. banif = bani - 1100;
  53. cs_set_user_money(id,banif);
  54. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat!team HE!y+!team2Flash!y.",banif);
  55. give_item(id,"weapon_hegrenade")
  56. give_item(id,"weapon_flashbang");
  57. give_item(id,"weapon_flashbang");
  58. }
  59. case 1:
  60. {
  61. new bani,banif;
  62. bani = cs_get_user_money(id);
  63. if(bani < 5600) {
  64. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5600$");
  65. return PLUGIN_HANDLED;
  66. }
  67.  
  68. banif = bani - 5600;
  69. cs_set_user_money(id,banif);
  70. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamMachine Guns!y.",banif);
  71. give_item(id,"weapon_m249");
  72. }
  73. case 2:
  74. {
  75. new bani,banif;
  76. bani = cs_get_user_money(id);
  77. if(bani < 5500) {
  78. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5500$");
  79. return PLUGIN_HANDLED;
  80. }
  81.  
  82. banif = bani - 5500;
  83. cs_set_user_money(id,banif);
  84. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamViteza!y.",banif);
  85.  
  86. g_HasSpeed[ id ] = true;
  87. }
  88. case 3:
  89. {
  90. new bani,banif;
  91. bani = cs_get_user_money(id);
  92. if(bani < 11000) {
  93. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 11000$");
  94. return PLUGIN_HANDLED;
  95. }
  96.  
  97. banif = bani - 11000;
  98. cs_set_user_money(id,banif);
  99. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamGravitatie!y.",banif);
  100. set_user_gravity(id,0.4);
  101. }
  102. case 4:
  103. {
  104. new bani,banif;
  105. bani = cs_get_user_money(id);
  106. if(bani < 14000) {
  107. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 14000$");
  108. return PLUGIN_HANDLED;
  109. }
  110.  
  111. banif = bani - 14000;
  112. cs_set_user_money(id,banif);
  113. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !teamInvizibilitate!y.",banif);
  114. set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 30);
  115. }
  116. case 5:
  117. {
  118. new bani,banif;
  119. bani = cs_get_user_money(id);
  120. if(bani < 9000) {
  121. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 9000$");
  122. return PLUGIN_HANDLED;
  123. }
  124.  
  125. banif = bani - 9000;
  126. cs_set_user_money(id,banif);
  127. set_user_health ( id, get_user_health ( id ) + 50 );
  128. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !team+50 Health!y.",banif);
  129. }
  130. case 6:
  131. {
  132. new bani, banif;
  133. bani = cs_get_user_money(id);
  134. if(bani < 1500) {
  135. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 1500$");
  136. return PLUGIN_HANDLED;
  137. }
  138.  
  139. banif = bani - 1500;
  140. cs_set_user_money(id,banif);
  141. set_user_armor ( id, get_user_armor ( id ) + 50 );
  142. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai cumparat !team+50 Armor!y.",banif);
  143. }
  144. case 7:
  145. {
  146. new bani, banif;
  147. bani = cs_get_user_money(id);
  148. if(bani < 5000) {
  149. chat_color(id,"!g[Predator.Indungi.Ro]!y Ai nevoie de!team 5000$");
  150. return PLUGIN_HANDLED;
  151. }
  152.  
  153. banif = bani - 5000;
  154. cs_set_user_money(id, banif);
  155. set_user_frags(id, get_user_frags(id) + 3);
  156. chat_color(id, "!g[Predator.Indungi.Ro]!y Ai cumparat !team+3 Kills!y.");
  157. }
  158.  
  159. default: return PLUGIN_HANDLED;
  160. }
  161. return PLUGIN_HANDLED;
  162. }
  163.  
  164. public removeInvis(id) {
  165. set_user_noclip(id,0);
  166. }
  167.  
  168. public set_speed( id )
  169. {
  170. if ( !g_HasSpeed[ id ] )
  171. return 1;
  172.  
  173. new Float:speed = get_user_maxspeed(id) + 130.0;
  174. set_user_maxspeed(id, speed);
  175.  
  176. return 1;
  177. }
  178.  
  179. public client_connect( id ) g_HasSpeed[ id ] = false;
  180. public client_disconnect( id ) g_HasSpeed[ id ] = false;
  181. public Spawn(id) g_HasSpeed[id] = false;
  182.  
  183. stock chat_color(const id, const input[], any:...)
  184. {
  185. new count = 1, players[32]
  186. static msg[191]
  187. vformat(msg, 190, input, 3)
  188.  
  189. replace_all(msg, 190, "!g", "^4")
  190. replace_all(msg, 190, "!y", "^1")
  191. replace_all(msg, 190, "!team", "^3")
  192.  
  193. if (id) players[0] = id; else get_players(players, count, "ch")
  194. {
  195. for (new i = 0; i < count; i++)
  196. {
  197. if (is_user_connected(players[i]))
  198. {
  199. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  200. write_byte(players[i]);
  201. write_string(msg);
  202. message_end();
  203. }
  204. }
  205. }
  206. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement