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.47 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. new bool: g_kroki[33];
  16. public plugin_init() {
  17. register_plugin(PLUGIN, VERSION, AUTHOR)
  18. pCVAR = register_cvar("jail_kroki", "1");
  19. register_clcmd("say /kroki", "cmdKroki");
  20. register_clcmd("say_team /kroki", "cmdKroki");
  21. }
  22.  
  23. public cmdKroki(id){
  24. if(!is_user_connected(id) || get_user_team(id) != 2 || jail_get_prowadzacy() == id)
  25. return;
  26. if(!g_kroki[id])
  27. }
  28. public client_PostThink(id)
  29. {
  30. if(!(get_user_team(id) == 2) || !is_user_alive(id) ||
  31. !(entity_get_int(id, EV_INT_flags) & FL_ONGROUND) || entity_get_int(id, EV_ENT_groundentity) || !g_kroki[id] || get_pcvar_num(pCVAR) < 1)
  32. return PLUGIN_CONTINUE
  33.  
  34. static Float:origin[3]
  35. static Float:last[3]
  36.  
  37. entity_get_vector(id, EV_VEC_origin, origin)
  38. if(get_distance_f(origin, last) < 32.0)
  39. {
  40. return PLUGIN_CONTINUE
  41. }
  42.  
  43. vec_copy(origin, last)
  44. if(entity_get_int(id, EV_INT_bInDuck))
  45. origin[2] -= 18.0
  46. else
  47. origin[2] -= 36.0
  48.  
  49.  
  50. message_begin(MSG_BROADCAST, SVC_TEMPENTITY, {0,0,0}, 0)
  51. write_byte(TE_WORLDDECAL)
  52. write_coord(floatround(origin[0]))
  53. write_coord(floatround(origin[1]))
  54. write_coord(floatround(origin[2]))
  55. write_byte(105)
  56. message_end()
  57.  
  58. return PLUGIN_CONTINUE
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement