HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define PLUGIN "AWP Shake"
  5. #define VERSION "1.02"
  6. #define AUTHOR "v3x"
  7.  
  8. new g_iMsgScreenShake
  9.  
  10. public plugin_init()
  11. {
  12. register_plugin(PLUGIN,VERSION,AUTHOR)
  13. register_event("CurWeapon","Current_Weapon","be","1=1")
  14. register_cvar("awp_shake","1")
  15. g_iMsgScreenShake = get_user_msgid("ScreenShake")
  16. }
  17.  
  18. public plugin_modules() require_module("Engine")
  19.  
  20. public Current_Weapon(id)
  21. {
  22. if(!get_cvar_num("awp_shake"))
  23. return PLUGIN_CONTINUE
  24.  
  25. new clip, ammo
  26. new weapon = get_user_weapon(id,clip,ammo)
  27.  
  28. if(weapon == CSW_AWP)
  29. {
  30. if((get_user_button(id)&IN_ATTACK) || (get_user_button(id)&IN_ATTACK2))
  31. {
  32. message_begin(MSG_ONE,g_iMsgScreenShake,{0,0,0},id)
  33. write_short( 1<<14 )
  34. write_short( 1<<14 )
  35. write_short( 1<<14 )
  36. message_end()
  37. }
  38. }
  39.  
  40. return PLUGIN_CONTINUE
  41. }