Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. #define PLUGIN_NAME "HvH | HvH"
  5. #define PLUGIN_VERSION "1.0.0"
  6.  
  7. public Plugin myinfo =
  8. {
  9. name = PLUGIN_NAME,
  10. author = "Radat.",
  11. description = "Kills Player on Teleport or Invalid Angles.",
  12. version = PLUGIN_VERSION,
  13. url = "http://www.unknowncheats.me/forum/members/1646968.html"
  14. }
  15.  
  16. public void OnPluginStart()
  17. {
  18. HookEvent("round_start", RoundStart, EventHookMode_PostNoCopy);
  19. CreateTimer(3.0, CheckUntrusted, _, TIMER_REPEAT);
  20. }
  21.  
  22. public Action:HalfTime() {
  23. PrintToChatAll("\x01\x0B \x04[HvH] This Server is sponsored by Excalibur");
  24. }
  25.  
  26. public Action:RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
  27. {
  28. for(int i = 1; i <= MaxClients; i++)
  29. {
  30. if(IsValidEntity(i) && HasEntProp(i, Prop_Send, "m_vecOrigin") && IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i))
  31. {
  32. SetEntProp(i, Prop_Send, "m_iAccount", 16000);
  33. }
  34. }
  35. PrintToChatAll("\x01\x0B \x04[HvH] Everyone got 16k. HF.");
  36. }
  37.  
  38. public Action CheckUntrusted(Handle timer)
  39. {
  40. for(int i = 1; i <= MaxClients; i++)
  41. {
  42. if(IsValidEntity(i) && HasEntProp(i, Prop_Send, "m_vecOrigin") && IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i))
  43. {
  44. char clientname[32];
  45. float pos[3];
  46. float view_pos[3];
  47. GetClientName(i, clientname, 32);
  48. GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos);
  49. GetClientEyeAngles(i, view_pos);
  50.  
  51. if (pos[0] == 0 && pos[1] == 0)
  52. {
  53. PrintToChatAll("\x01\x0B \x04[HvH] %s tried to use Teleport.", clientname);
  54. ForcePlayerSuicide(i);
  55. }
  56.  
  57. if (view_pos[0] > 89 || view_pos[0] < -89)
  58. {
  59. PrintToChatAll("\x01\x0B \x04[HvH] %s uses invalid angles (X: %f, Y: %f, Z: %f)", clientname, view_pos[0], view_pos[1], view_pos[2]);
  60. ForcePlayerSuicide(i);
  61. }
  62.  
  63. if (view_pos[1] > 180 || view_pos[1] < -180)
  64. {
  65. PrintToChatAll("\x01\x0B \x04[HvH] %s uses invalid angles (X: %f, Y: %f, Z: %f)", clientname, view_pos[0], view_pos[1], view_pos[2]);
  66. ForcePlayerSuicide(i);
  67. }
  68.  
  69. if (view_pos[2] > 50 || view_pos[2] < -50)
  70. {
  71. PrintToChatAll("\x01\x0B \x04[HvH] %s uses invalid angles (X: %f, Y: %f, Z: %f)", clientname, view_pos[0], view_pos[1], view_pos[2]);
  72. ForcePlayerSuicide(i);
  73.  
  74. if (view_pos[3] > 58 || view_pos[2] < -58)
  75. {
  76. PrintToChatAll("\x01\x0B \x04[HvH] %s uses invalid angles (X: %f, Y: %f, Z: %f)", clientname, view_pos[0], view_pos[1], view_pos[2]);
  77. ForcePlayerSuicide(i);
  78.  
  79. if (view_pos[4] > 60 || view_pos[2] < -60)
  80. {
  81. PrintToChatAll("\x01\x0B \x04[HvH] %s uses invalid angles (X: %f, Y: %f, Z: %f)", clientname, view_pos[0], view_pos[1], view_pos[2]);
  82. ForcePlayerSuicide(i);
  83. }
  84. }
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement