Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <colorchat>
  5.  
  6. #define MAX_PLAYERS 32
  7.  
  8. new bool:g_hs_mode
  9. new bool:g_RestartAttempt[MAX_PLAYERS+1]
  10.  
  11. public plugin_init() {
  12. register_plugin("HeadShot Mod", "1.1", "ConnorMcLeod")
  13.  
  14. register_event("TextMsg", "eRestartAttempt", "a", "2=#Game_will_restart_in")
  15. register_event("ResetHUD", "eResetHUD", "be")
  16.  
  17. register_clcmd("clcmd_fullupdate", "fullupdateCmd")
  18. }
  19.  
  20. public fullupdateCmd() {
  21. return PLUGIN_HANDLED_MAIN
  22. }
  23.  
  24. public eRestartAttempt() {
  25. new players[MAX_PLAYERS], num
  26. get_players(players, num, "a")
  27. for (new i; i < num; ++i)
  28. g_RestartAttempt[players[i]] = true
  29. }
  30.  
  31. public eResetHUD(id) {
  32. if (g_RestartAttempt[id]) {
  33. g_RestartAttempt[id] = false
  34. return
  35. }
  36. event_player_spawn(id)
  37. }
  38.  
  39. event_player_spawn(id)
  40. {
  41. if(g_hs_mode)
  42. {
  43. display_status(id)
  44. }
  45. }
  46.  
  47. public forward_traceline(Float:v1[3], Float:v2[3], noMonsters, pentToSkip)
  48. {
  49. if(!is_user_alive(pentToSkip))
  50. return FMRES_IGNORED
  51.  
  52. static entity2 ; entity2 = get_tr(TR_pHit)
  53. if(0 > entity2 > 32 || !is_user_alive(entity2))
  54. return FMRES_IGNORED
  55.  
  56. if(pentToSkip == entity2)
  57. return FMRES_IGNORED
  58.  
  59. if(get_tr(TR_iHitgroup) != 1) {
  60. set_tr(TR_flFraction,1.0)
  61. return FMRES_SUPERCEDE
  62. }
  63. return FMRES_IGNORED
  64. }
  65.  
  66. display_status(id=0)
  67. {
  68. for(new i = 0; i < 3; i++)
  69. {
  70. ColorChat(id, NORMAL, "[ HS Only ] ^x04Od teraz możesz zabić tylko ^x03HeadShotem!");
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement