Advertisement
Guest User

Untitled

a guest
May 29th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4.  
  5. new const TAG[] = "!gSHOP!t"
  6.  
  7. public plugin_init() {
  8. register_clcmd("say", "chksay")
  9. register_clcmd("say_team", "chksay")
  10. }
  11.  
  12. new const ctshop[] = {
  13. "\wHP [\r50\w] \y500$",
  14. "\wAP [\r50\w] \y500$",
  15. "\wAK47 \y2500$",
  16. "\wGrenade Pack \y700$"
  17. }
  18.  
  19. new const tshop[] = {
  20. "\wHP [\r50\w] \y500$",
  21. "\wAP [\r50\w] \y500$",
  22. "\wM4A1 \y2500$",
  23. "\wGrenade Pack \y700$"
  24. }
  25.  
  26. new const keys[] = {
  27. "1",
  28. "2",
  29. "3",
  30. "4"
  31. }
  32. public chksay(Client) {
  33. if(!is_user_alive(Client)) {
  34. client_print(Client, print_chat, "[%s] Trebuie sa fi !gviu !tca sa folosesti shop-ul!", TAG)
  35. }
  36.  
  37. new team = cs_get_user_team(Client)
  38. switch(team) {
  39. case CS_TEAM_CT : {
  40. new temp[64]
  41. formatex(temp, charsmax(temp), "\w[\rSHOP CT\w]")
  42. new menu = menu_create(temp, "ct_shop")
  43.  
  44. for(new i = 0; i < sizeof ctshop; i++) {
  45. for(new m = 0; m < sizeof keys; m++) {
  46. menu_additem(menu, ctshop[i], keys[m], 0)
  47. menu_setprot(menu, MPROP_EXIT, MEXIT_ALL)
  48. menu_display(Client, menu, 0)
  49. }
  50. }
  51. }
  52. case CS_TEAM_T : {
  53. new temp[64]
  54. formatex(temp, charsmax(temp), "\w[\rT SHOP\w]")
  55. new menu = menu_create(temp, "t_shop")
  56.  
  57. for(new x = 0; x < sizeof tshop; x++) {
  58. for(new london = 0; london < sizeof keys; london++) {
  59. menu_additem(menu, tshop[x], keys[london], 0)
  60. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  61. menu_display(Client, menu, 0)
  62. }
  63. }
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement