Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock CheckPlayers()
- {
- if(Iter_Count(TdmPlayers) == 1 && TdmInfo[Started])
- {
- TdmInfo[InQueue] = false;
- format(tString, sizeof(tString),"TDM: TDM has been finished!");
- SendClientMessageToAll(-1, tString);
- if(TdmInfo[BlueKills] > TdmInfo[RedKills])
- {
- SendClientMessageToAll(-1, "TDM: Blue team is the winner.");
- }
- else if(TdmInfo[BlueKills] < TdmInfo[RedKills])
- {
- SendClientMessageToAll(-1, "TDM: Red team is the winner.");
- }
- else if(TdmInfo[BlueKills] == TdmInfo[RedKills]) SendClientMessageToAll(-1, "TDM: Match has been drawn!");
- foreach(new i: Player) if(Iter_Contains(TdmPlayers, i))
- {
- GivePlayerMoney(i, 10000);
- SetPlayerScore(i, GetPlayerScore(i)+10);
- SetPlayerVirtualWorld(i, 0);
- SetPlayerTeam(i, NO_TEAM);
- Iter_Remove(TdmPlayers, i);
- if(Iter_Contains(BluePlayers, i)) Iter_Remove(BluePlayers, i);
- else if(Iter_Contains(RedPlayers, i)) Iter_Remove(RedPlayers, i);
- ResetPlayerWeapons(i);
- TogglePlayerControllable(i,1);
- SetPlayerHealth(i, 100);
- TextDrawHideForPlayer(i, BlueTeamPlayersTD);
- TextDrawHideForPlayer(i, RedTeamPlayersTD);
- TextDrawShowForPlayer(i, TeamPlayersNames);
- SpawnPlayer(i);
- }
- TdmInfo[Started] = false;
- Iter_Clear(TdmPlayers);
- Iter_Clear(BluePlayers);
- Iter_Clear(RedPlayers);
- TdmInfo[CurrentMap] = 0;
- TdmInfo[BlueKills] = 0;
- TdmInfo[RedKills] = 0;
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment