HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <fun>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5.  
  6. #define PLUGIN "Lathatatlansag"
  7. #define AUTHOR "expert"
  8. #define VERSION "1.0"
  9.  
  10. new cvar_cost
  11. new g_pcvaramount
  12.  
  13. public plugin_init()
  14. {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16.  
  17. register_concmd("lathatatlansag","invisible")
  18. register_concmd("say lathatatlansag","invisible")
  19. register_concmd("say /lathatatlansag","invisible")
  20.  
  21. RegisterHam(Ham_Killed, "player", "halal", 1)
  22. g_pcvaramount = register_cvar("lathatatlansag_max", "0")
  23. cvar_cost = register_cvar("lathatatlansag_ara", "16000")
  24. }
  25.  
  26. public halal(id)
  27. {
  28. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
  29. }
  30.  
  31. public invisible(id)
  32. {
  33. if ( !is_user_alive(id) )
  34. {
  35. client_print(id,print_chat, "[Lathatatlansag] Csak Elo Jatekos tud Lathatatlansagot venni")
  36. return PLUGIN_HANDLED
  37. }
  38.  
  39. new money = cs_get_user_money(id)
  40.  
  41. if (money >= get_pcvar_num(cvar_cost))
  42. {
  43. cs_set_user_money(id, money - get_pcvar_num(cvar_cost))
  44. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(g_pcvaramount))
  45. client_print(id,print_chat, "[Lathatatlansag] Te sikeresen megvetted a lathatatlansagot!!")
  46. }
  47. else
  48. {
  49. client_print(id, print_chat, "[Lathatatlansag] Nincs eleg penzed a Lathatatlansagra-ra. ARA $%d ", get_pcvar_num(cvar_cost))
  50. return PLUGIN_HANDLED
  51. }
  52. return PLUGIN_CONTINUE
  53. }