Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <fun>
  5. #include <cstrike>
  6. #include <fakemeta>
  7.  
  8. public plugin_init()
  9. {
  10. register_plugin("[ZP] CS-CLUB VIP", "1.0", "miO")
  11. register_concmd( "svip_menu","vipmenu" );
  12. }
  13. public vipmenu( id )
  14. {
  15. if(!(get_user_flags(id) & ADMIN_LEVEL_H))
  16. {
  17. ChatColor(id, "!g[ZP] Sorry, but you have no access to the VIP MENU, Buy VIP by Contacting @Madmad .");
  18.  
  19. return PLUGIN_HANDLED;
  20. }
  21.  
  22. new menu = menu_create( "w[CSCLUB] VIP Menu:", "menu_handler" );
  23. menu_additem( menu, "wJanus-3 r[y8000r$]", "", 0 );
  24. menu_additem( menu, "wThanatos-7r[3000r$]", "", 0 );
  25. menu_additem( menu, "wMP5 Born Beastr[5000r$]", "", 0 );
  26. menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
  27. menu_display( id, menu, 0 );
  28.  
  29. }
  30. public menu_handler( id, menu, item )
  31. {
  32. switch( item )
  33. {
  34. case 0:
  35. {
  36. new money = cs_get_user_money(id)
  37.  
  38. if (money >= 8000)
  39. {
  40. cs_set_user_money(id, money - 8000)
  41. client_cmd(id, "svip_janus3")
  42. ChatColor(id,"!g[CSC] !yYou have bought !g[janus3] yEnjoy Killing Zombies.");
  43. }
  44.  
  45. else
  46. {
  47. ChatColor(id,"!g[AMXX] !yYou dont have enough money to buy !g[janus3]")
  48. }
  49. }
  50. case 1:
  51. {
  52. new money = cs_get_user_money(id)
  53.  
  54. if (money >= 3000)
  55. {
  56. cs_set_user_money(id, money - 3000)
  57. client_cmd(id, "svip_tho7")
  58. ChatColor(id,"!g[CSC] !yYou have bought !g[Thanatos-7] yEnjoy Killing Zombies.");
  59. }
  60.  
  61. else
  62. {
  63. ChatColor(id,"!g[CSC] !yYou dont have enough money to buy !g[Thanatos-7]")
  64. }
  65. }
  66. case 2:
  67. {
  68. new money = cs_get_user_money(id)
  69.  
  70. if (money >= 5000)
  71. {
  72. cs_set_user_money(id, money - 5000)
  73. client_cmd(id, "svip_mp5")
  74. ChatColor(id,"!g[CSC] !yYou have bought !g[MP5 Born Beast] yEnjoy Killing Zombies.");
  75. }
  76.  
  77. else
  78. {
  79. ChatColor(id,"!g[CSC] !yYou dont have enough money to buy !g[MP5 Born Beast]")
  80. }
  81. }
  82. }
  83.  
  84. menu_destroy( menu );
  85. return PLUGIN_HANDLED;
  86. }
  87. // Stock: ChatColor!
  88. stock ChatColor(const id, const input[], any:...)
  89. {
  90. new count = 1, players[32]
  91. static msg[191]
  92. vformat(msg, 190, input, 3)
  93.  
  94. replace_all(msg, 190, "!g", "^4") // Green Color
  95. replace_all(msg, 190, "!y", "^1") // Default Color
  96. replace_all(msg, 190, "!t", "^3") // Team Color
  97. replace_all(msg, 190, "!t2", "^0") // Team2 Color
  98.  
  99. if (id) players[0] = id; else get_players(players, count, "ch")
  100. {
  101. for (new i = 0; i < count; i++)
  102. {
  103. if (is_user_connected(players[i]))
  104. {
  105. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  106. write_byte(players[i]);
  107. write_string(msg);
  108. message_end();
  109. }
  110. }
  111. }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement