Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. public PlVers:__version =
  2. {
  3. version = 5,
  4. filevers = "1.3.4",
  5. date = "12/20/2011",
  6. time = "15:59:40"
  7. };
  8. new Float:NULL_VECTOR[3];
  9. new String:NULL_STRING[4];
  10. public Extension:__ext_core =
  11. {
  12. name = "Core",
  13. file = "core",
  14. autoload = 0,
  15. required = 0,
  16. };
  17. new MaxClients;
  18. public Plugin:myinfo =
  19. {
  20. name = "GL Crash Fix",
  21. description = "Block cmd crash exploit",
  22. author = "Griffin",
  23. version = "0.1",
  24. url = "http://www.sourcemod.net/"
  25. };
  26. new bool:g_bKickInProgress[65];
  27. public __ext_core_SetNTVOptional()
  28. {
  29. MarkNativeAsOptional("GetFeatureStatus");
  30. MarkNativeAsOptional("RequireFeature");
  31. MarkNativeAsOptional("AddCommandListener");
  32. MarkNativeAsOptional("RemoveCommandListener");
  33. VerifyCoreVersion();
  34. return 0;
  35. }
  36.  
  37. PrintToChatAll(String:format[])
  38. {
  39. decl String:buffer[192];
  40. new i = 1;
  41. while (i <= MaxClients)
  42. {
  43. if (IsClientInGame(i))
  44. {
  45. SetGlobalTransTarget(i);
  46. VFormat(buffer, 192, format, 2);
  47. PrintToChat(i, "%s", buffer);
  48. i++;
  49. }
  50. i++;
  51. }
  52. return 0;
  53. }
  54.  
  55. public OnPluginStart()
  56. {
  57. AddCommandListener(Command_Groundlist, "groundlist");
  58. return 0;
  59. }
  60.  
  61. public OnClientAuthorized(client)
  62. {
  63. g_bKickInProgress[client] = 0;
  64. return 0;
  65. }
  66.  
  67. public Action:Command_Groundlist(client, String:command[], args)
  68. {
  69. if (!g_bKickInProgress[client])
  70. {
  71. CreateTimer(0.1, Timer_KickShithead, client, 2);
  72. g_bKickInProgress[client] = 1;
  73. }
  74. return Action:3;
  75. }
  76.  
  77. public Action:Timer_KickShithead(Handle:timer, any:client)
  78. {
  79. if (IsClientInGame(client))
  80. {
  81. PrintToChatAll("[SM] %N was kicked for attempting to crash the server.", client);
  82. KickClientEx(client, "You were kicked for attempting to crash the server.");
  83. }
  84. g_bKickInProgress[client] = 0;
  85. return Action:0;
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement