Advertisement
Guest User

Untitled

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