Advertisement
Diskretor

Untitled

Jun 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. #define PLUGIN_VERSION "1.0"
  5.  
  6. #pragma semicolon 1
  7. #pragma newdecls required
  8.  
  9. public Plugin myinfo =
  10. {
  11. name = "L4D Kick Special Infected",
  12. author = "Alex Dragokas",
  13. description = "Kick Special Infected",
  14. version = "1.0",
  15. url = "https://github.com/dragokas"
  16. };
  17.  
  18. public void OnPluginStart()
  19. {
  20. HookEvent("player_spawn", Event_PlayerSpawn, EventHookMode_Post);
  21. }
  22.  
  23. public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
  24. {
  25. int client = GetClientOfUserId(GetEventInt(event, "userid"));
  26.  
  27. if (client != 0 && IsClientInGame(client))
  28. {
  29. int class = GetEntProp(client, Prop_Send, "m_zombieClass") + 1;
  30.  
  31. // hunter, boomer or smocker
  32. if (class == 2 || class == 3 || class == 4)
  33. {
  34. KickClientEx(client, "Tournament rules");
  35. }
  36. PrintToChatAll("SI is kicked.");
  37. }
  38. return Plugin_Continue;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement