Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <camer>
- public void OnPluginStart()
- {
- CreateTimer(0.1, sprawdz, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
- }
- public Action sprawdz(Handle timer)
- {
- int alive = GetAliveCT();
- int alive2 = GetAliveT();
- if(alive <= 1 || alive2 <=1)
- CS_TerminateRound(0.1, CSRoundEnd_Draw, true);
- }
- stock int GetAliveCT()
- {
- int tym = 0;
- for(int i = 0; i<=MaxClients; i++)
- {
- if(IsValidClient(i) && GetClientTeam(i) == CS_TEAM_CT)
- tym++;
- }
- return tym;
- }
- stock int GetAliveT()
- {
- int tym = 0;
- for(int i = 0; i<=MaxClients; i++)
- {
- if(IsValidClient(i) && GetClientTeam(i) == CS_TEAM_T)
- tym++;
- }
- return tym;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement