Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public setAutoJoin(index)
  2. {
  3. if(is_user_bot(index))
  4. {
  5. return;
  6. }
  7.  
  8. new terroristCount;
  9.  
  10. #if not defined ForPlayers
  11.  
  12. #define ForPlayers(%1) for(new %1 = 1; %1 <= 32; %1++)
  13.  
  14. #endif
  15.  
  16. ForPlayers(i)
  17. {
  18. if(!is_user_connected(i))
  19. {
  20. continue;
  21. }
  22.  
  23. if(cs_get_user_team(i) == CS_TEAM_T)
  24. {
  25. terroristCount++;
  26. }
  27. }
  28.  
  29. if(terroristCount >= 1)
  30. {
  31. cs_set_user_team(index, CS_TEAM_CT);
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement