CamerDisco

Untitled

May 1st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. stock int PoliczGraczy()
  4. {
  5. int ilosc = 0;
  6. for(int i = 1; i<=MaxClients; i++)
  7. {
  8. if(IsValidClient(i))
  9. ilosc++;
  10. }
  11. return ilosc;
  12. }
  13.  
  14. public void OnPluginStart()
  15. {
  16. CreateTimer(0.1, Sprawdz, _, TIMER_REPEAT);
  17. }
  18.  
  19. public Action Sprawdz(Handle timer)
  20. {
  21. int graczy = PoliczGraczy();
  22. if(graczy < 1)
  23. CS_TerminateRound(0.1, CSRoundEnd_Draw, true);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment