DeathChaos25

L4D1 bots

Mar 31st, 2015
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. public PlayerJoined_Event(Handle:event, const String:name[], bool:dontBroadcast)
  2. {
  3.     ServerCommand("sb_add biker;sb_add manager;sb_add namvet;");
  4.    
  5.     for (new i = 1; i <= MaxClients; i++)
  6.     {
  7.         if (IsClientConnected(i) && IsClientInGame(i))
  8.         {
  9.             if (IsFakeClient(i) && GetClientTeam(i) == 4)
  10.             {
  11.                 ChangeClientTeam(i, 2);
  12.             }
  13.             else Debug_PrintText("Client %N is not a L4D1 Survivor Bot! This Client's Team is Team %i)", i, GetClientTeam(i));
  14.         }
  15.     }
  16. }
  17.  
  18. #if DEBUG
  19. stock Debug_PrintText(const String:format[], any:...)
  20. {
  21.     decl String:buffer[256];
  22.     VFormat(buffer, sizeof(buffer), format, 2);
  23.     LogMessage(buffer);
  24.    
  25.     new AdminId:adminId;
  26.     for (new client = 1; client <= MaxClients; client++)
  27.     {
  28.         if (!IsClientInGame(client) || IsFakeClient(client))
  29.         {
  30.             continue;
  31.         }
  32.         adminId = GetUserAdmin(client);
  33.         if (adminId == INVALID_ADMIN_ID || !GetAdminFlag(adminId, Admin_Root))
  34.         {
  35.             continue;
  36.         }
  37.         PrintToChat(client, DEBUG_PRINT_FORMAT, DEBUG_TAG, buffer);
  38.     }
  39. }
  40. #endif
Advertisement
Add Comment
Please, Sign In to add comment