#include #include #define PLUGIN_VERSION "1.0" #pragma semicolon 1 #pragma newdecls required public Plugin myinfo = { name = "L4D Kick Special Infected", author = "Alex Dragokas", description = "Kick Special Infected", version = "1.0", url = "https://github.com/dragokas" }; public void OnPluginStart() { HookEvent("player_spawn", Event_PlayerSpawn, EventHookMode_Post); } public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); if (client != 0 && IsClientInGame(client)) { int class = GetEntProp(client, Prop_Send, "m_zombieClass") + 1; // hunter, boomer or smocker if (class == 2 || class == 3 || class == 4) { KickClientEx(client, "Tournament rules"); } PrintToChatAll("SI is kicked."); } return Plugin_Continue; }