public OnPlayerDeath(playerid, killerid, reason) { new string[256], string3[256]; DeathCount[playerid]++; if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); SetPlayerScore(playerid, GetPlayerScore(playerid)-1); if(gTeam[playerid] == TEAM_1)sCount1--; if(gTeam[playerid] == TEAM_2)sCount2--; new lol[256]; format(lol, sizeof(lol), "%s: %d || %d :%s", TEAM2, sCount2,sCount1,TEAM1); SendClientMessageToAll(0xAAAAAAAA, lol); } if(IsPlayerConnected(killerid)) { if(gTeam[killerid] == TEAM_1) sCount1++; if(gTeam[killerid] == TEAM_2) sCount2++; format(string3, sizeof(string3), "%s: %d || %d :%s", TEAM2, sCount2,sCount1,TEAM1); SendClientMessageToAll(COLOR_YELLOW, string3); } //---- this is good----------------------------------------------------------------- if(sCount1 == MAXKILLS) { format(string, sizeof(string), "Clan %s has won the war!", TEAM1); strins(winner,TEAM1,0,sizeof(winner)); iStats(); sStats(); iFreeze(); SendClientMessageToAll(COLOR_YELLOW, string); } else if(sCount2 == MAXKILLS) { format(string, sizeof(string), "Clan %s has won the war!", TEAM2); strins(winner,TEAM2,0,sizeof(winner)); iStats(); sStats(); iFreeze(); SendClientMessageToAll(COLOR_YELLOW, string); } if(gTeam[killerid] != gTeam[playerid]){ SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); if(gTeam[killerid] == TEAM_1) sCount1++; if(gTeam[killerid] == TEAM_2) sCount2++; } else { new warning[256]; format(warning, sizeof(warning), "Be careful! Do Not Team-Kill!"); SendClientMessage(killerid, 0xFFFF00AA, warning); SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid, GetPlayerScore(killerid) - 1); if(gTeam[killerid] == TEAM_1) sCount1--; if(gTeam[killerid] == TEAM_2) sCount2--; tkscore[playerid]++; } return 1; }