dRaGoNZoNeHD

Untitled

Sep 27th, 2014
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. // |========= V.I.P Weapons Menu ==========|
  2. // |========= Made By dRaGoNeLy ===========|
  3.  
  4. /* Librariile Pluginului */
  5.  
  6. #include <amxmodx>
  7. #include <amxmisc>
  8. #include <hamsandwich>
  9. #include <cstrike>
  10. #include <fun>
  11.  
  12. /* Descrierea Pluginului */
  13.  
  14. #define PLUGIN "V.I.P Menu"
  15. #define VERSION "1.0"
  16. #define AUTHOR "dRaGoNeLy"
  17.  
  18. /* Flagul V.I.P */
  19.  
  20. #define VIP_FLAG ADMIN_LEVEL_H
  21.  
  22. /* Tabsize */
  23.  
  24. #pragma tabsize 1
  25.  
  26. // Baza Pluginului
  27.  
  28. public plugin_init()
  29. {
  30. register_plugin(PLUGIN, VERSION, AUTHOR);
  31. register_clcmd("say /vmenu", "ClCmdVIPTest", VIP_FLAG);
  32. register_clcmd("say_team /vmenu", "ClCmdVIPTest", VIP_FLAG);
  33. }
  34.  
  35. /* Testare Acces V.I.P */
  36.  
  37. public ClCmdVIPTest(id)
  38. {
  39. if(get_user_flags(id) & VIP_FLAG)
  40. {
  41. if(!is_user_alive(id))
  42. chat_color(id, "!g[!nVIP!g]!n Esti mort!");
  43. else
  44. ClCmdVIP(id)
  45. }
  46. else
  47. chat_color(id, "!g[!nVIP!g]!n Nu ai acces la V.I.P Menu!");
  48. }
  49.  
  50. /* Meniul V.I.P */
  51.  
  52. public ClCmdVIP(id)
  53. {
  54. new vipMenu = menu_create("\rV\w.\rI\w.\rP \yMenu", "VIPMenu");
  55.  
  56. menu_additem(vipMenu, "\y[100]\d[Health]", "1");
  57. menu_additem(vipMenu, "\y[200]\d[Armor]", "2");
  58. menu_additem(vipMenu, "\y[300]\d[Gravity]", "3");
  59. menu_additem(vipMenu, "\y[WPN]\d[M249]", "4");
  60. menu_additem(vipMenu, "\y[WPN]\d[AWP]", "5");
  61. menu_additem(vipMenu, "\y[WPN]\d[XM1014]", "6");
  62. menu_additem(vipMenu, "\y[3000]\d[Money]", "7");
  63.  
  64. menu_setprop(vipMenu, MPROP_EXIT, MEXIT_ALL);
  65. menu_display(id, vipMenu, 0);
  66.  
  67. return 1;
  68. }
  69.  
  70. /* Actiunea Meniului */
  71.  
  72. public VIPMenu(id, vipMenu, item)
  73. {
  74. if(item == MENU_EXIT)
  75. {
  76. menu_destroy (vipMenu);
  77. return 1;
  78. }
  79.  
  80. switch (item)
  81. {
  82. case 1:
  83. {
  84. set_user_health(id, get_user_health(id) + 100)
  85. return 1;
  86. }
  87. case 2:
  88. {
  89. set_user_armor(id, get_user_armor(id) + 200)
  90. return 1;
  91. }
  92. case 3:
  93. {
  94. set_user_gravity(id, 0.4)
  95. return 1;
  96. }
  97. case 4:
  98. {
  99. give_item(id, "weapon_m249")
  100. cs_set_user_bpammo(id, CSW_M249, 250)
  101. return 1;
  102. }
  103. case 5:
  104. {
  105. give_item(id, "weapon_awp")
  106. cs_set_user_bpammo(id, CSW_AWP, 250)
  107. return 1;
  108. }
  109. case 6:
  110. {
  111. give_item(id, "weapon_xm1014")
  112. cs_set_user_bpammo(id, CSW_XM1014, 250)
  113. return 1;
  114. }
  115. case 7:
  116. {
  117. cs_set_user_money(id, cs_get_user_money(id) + 3000)
  118. return 1;
  119. }
  120. }
  121. menu_destroy (vipMenu);
  122. return 1;
  123. }
  124.  
  125. /* Stockul De Culoare */
  126.  
  127. stock chat_color(const id, const input[], any:...)
  128. {
  129. new count = 1, players[32]
  130. static msg[191]
  131. vformat(msg, 190, input, 3)
  132.  
  133. replace_all(msg, 190, "!g", "^4")
  134. replace_all(msg, 190, "!y", "^1")
  135. replace_all(msg, 190, "!team", "^3")
  136. replace_all(msg, 190, "!n", "^0");
  137.  
  138. if (id) players[0] = id; else get_players(players, count, "ch")
  139. {
  140. for (new i = 0; i < count; i++)
  141. {
  142. if (is_user_connected(players[i]))
  143. {
  144. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  145. write_byte(players[i]);
  146. write_string(msg);
  147. message_end();
  148. }
  149. }
  150. }
  151. }
Advertisement
Add Comment
Please, Sign In to add comment