Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <engine>
  6. #include <jailbreak>
  7.  
  8. #define PLUGIN "xXPLUGINXx"
  9. #define VERSION "1.0"
  10. #define AUTHOR "JBEXTREME"
  11.  
  12. #define vec_copy(%1,%2) ( %2[0] = %1[0], %2[1] = %1[1],%2[2] = %1[2])
  13.  
  14. new pCVAR;
  15.  
  16. public plugin_init() {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. pCVAR = register_cvar("jail_kroki", "1");
  19.  
  20. }
  21. public client_PostThink(id)
  22. {
  23. if(!(get_user_team(id) == 2) || !is_user_alive(id) ||
  24.  
  25. !(entity_get_int(id, EV_INT_flags) & FL_ONGROUND) || entity_get_int(id, EV_ENT_groundentity) || !g_kroki[id] || id != jail_get_prowadzacy() || get_pcvar_num(pCVAR) < 1)
  26. return PLUGIN_CONTINUE
  27.  
  28. static Float:origin[3]
  29. static Float:last[3]
  30.  
  31. entity_get_vector(id, EV_VEC_origin, origin)
  32. if(get_distance_f(origin, last) < 32.0)
  33. {
  34. return PLUGIN_CONTINUE
  35. }
  36.  
  37. vec_copy(origin, last)
  38. if(entity_get_int(id, EV_INT_bInDuck))
  39. origin[2] -= 18.0
  40. else
  41. origin[2] -= 36.0
  42.  
  43.  
  44. message_begin(MSG_BROADCAST, SVC_TEMPENTITY, {0,0,0}, 0)
  45. write_byte(TE_WORLDDECAL)
  46. write_coord(floatround(origin[0]))
  47. write_coord(floatround(origin[1]))
  48. write_coord(floatround(origin[2]))
  49. write_byte(105)
  50. message_end()
  51.  
  52. return PLUGIN_CONTINUE
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement