Advertisement
CamerDisco

Untitled

Jun 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <camer>
  3.  
  4. public void OnPluginStart()
  5. {
  6. CreateTimer(0.1, sprawdz, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
  7. }
  8.  
  9. public Action sprawdz(Handle timer)
  10. {
  11. int alive = GetAliveCT();
  12. int alive2 = GetAliveT();
  13.  
  14. if(alive <= 1 || alive2 <=1)
  15. CS_TerminateRound(0.1, CSRoundEnd_Draw, true);
  16.  
  17. }
  18.  
  19. stock int GetAliveCT()
  20. {
  21. int tym = 0;
  22. for(int i = 0; i<=MaxClients; i++)
  23. {
  24. if(IsValidClient(i) && GetClientTeam(i) == CS_TEAM_CT)
  25. tym++;
  26. }
  27. return tym;
  28. }
  29.  
  30. stock int GetAliveT()
  31. {
  32. int tym = 0;
  33. for(int i = 0; i<=MaxClients; i++)
  34. {
  35. if(IsValidClient(i) && GetClientTeam(i) == CS_TEAM_T)
  36. tym++;
  37. }
  38. return tym;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement