All pastes #398303 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-17 02:50 UTC
rendered paste body
public OnPlayerDeath(playerid, killerid, reason)
{
	new string[256], string2[256], string3[256];
	DeathCount[playerid]++;
    SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000);

	if(killerid == INVALID_PLAYER_ID) {
	SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
	SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
	CreateExplosionSounds(10000, 1);
	GameTextForPlayer(playerid,"WASTED!",4000,5);
	}
	
	if(IsPlayerConnected(killerid))
	{
	if(gTeam[killerid] == TEAM_1)
	{
		sCount1++;
		format(string2, sizeof(string2), "%s Score: %d", TEAM1, sCount1);
		SendClientMessageToAll(COLOR_YELLOW, string2);
	}
	if(gTeam[killerid] == TEAM_2)
	{
	    sCount2++;
		format(string3, sizeof(string3), "%s Score: %d", TEAM2, sCount2);
		SendClientMessageToAll(COLOR_YELLOW, string3);
	}
	}
	if(sCount1 == MAXKILLS)
	{
	    format(string, sizeof(string), "%s has WON the CLAN WAR!", TEAM1);
	    strins(winner,TEAM1,0,sizeof(winner));
	    iStats();
		sStats();
	    SendClientMessageToAll(COLOR_YELLOW, string);
	}
	else if(sCount2 == MAXKILLS)
	{
	    format(string, sizeof(string), "%s has WON the CLAN WAR!", TEAM2);
	    strins(winner,TEAM2,0,sizeof(winner));
	    iStats();
		sStats();
	    SendClientMessageToAll(COLOR_YELLOW, string);
	}

if(gTeam[killerid] != gTeam[playerid])
{
	SendDeathMessage(killerid,playerid,reason);
	SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
	CreateExplosionSounds(10000, 1);
	GameTextForPlayer(playerid,"GODLIKE!",4000,5);

} else {

  new warning[256];
  format(warning, sizeof(warning), "Be careful! Do Not Team-Kill");
  SendClientMessage(killerid, 0xFFFF00AA, warning);
  SendDeathMessage(killerid,playerid,reason);
  CreateExplosionSounds(10000, 1);
  SetPlayerHealth(killerid, 0);
  SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
  tkscore[playerid]++;
  }
 return 1;
}