Advertisement
Guest User

Untitled

a guest
Feb 10th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. public Plugin myinfo ={
  4.     name = "",
  5.     author = "Me",
  6.     description = "My very first sourcemod plugin",
  7.     version = "0.1",
  8.     url = "http://www.sourcemod.net/"
  9. };
  10.  
  11.  
  12. public void OnPluginStart(){
  13.     HookEvent("player_team", Event_PlayerTeam);
  14. }
  15.  
  16. public void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast){
  17.     int playerClient = GetClientOfUserId(GetEventInt(event, "userid"));
  18.     int team = GetEventInt(event, "team");
  19.    
  20.     if(!IsFakeClient(playerClient)){
  21.         for (new i = 1; i <= MaxClients; i++){
  22.             if (IsClientInGame(i) && IsFakeClient(i) && GetClientTeam(i) == team){
  23.                 KickClient(i);
  24.                 break;
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement