All pastes #345724 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-02-08 19:59 UTC
rendered paste body
public OnPlayerDeath(playerid, killerid, reason)	{		new string[256];			DeathCount[playerid]++;		if(killerid == INVALID_PLAYER_ID) {	SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);	SetPlayerScore(playerid, GetPlayerScore(playerid)-1);}if(gTeam[killerid] != gTeam[playerid]){SetPlayerScore(killerid,GetPlayerScore(killerid)+1);SendDeathMessage(killerid,playerid,reason);if(gTeam[killerid] == TEAM_1){    sCount1++;}if(gTeam[killerid] == TEAM_2)			{    sCount2++;	}	} else {			new warning[256];			format(warning, sizeof(warning), "Uważaj, Team-killing jest niedozwolony! Twoja drużyna straciła jeden punkt!");			SendClientMessage(killerid, 0xF00000FF, warning);			SendDeathMessage(killerid,playerid,reason);			SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);			tkscore[playerid]++;	if(gTeam[killerid] == TEAM_1)		{		    sCount1--;		}	if(gTeam[killerid] == TEAM_2)		{		    sCount2--;		}		}			new str[256];			format(str, sizeof(str), "%s: %d || %d :%s", TEAM2, sCount2,sCount1,TEAM1);			SendClientMessageToAll(COLOR_BORDO, str);//==============================================================================if(sCount1 == MAXKILLS)	{	                TeleportAll();					format(string, sizeof(string), "%s won!", TEAM1);	    			strins(winner,TEAM1,0,sizeof(winner));			  		SendClientMessageToAll(COLOR_BLUE, string);			  		newSpawn=1;					SetTimer("GameModeExitFunc", gRoundTime, 0);	}	else if(sCount2 == MAXKILLS)	{							TeleportAll();							format(string, sizeof(string), "%s won!", TEAM2);			    			strins(winner,TEAM2,0,sizeof(winner));					  		SendClientMessageToAll(COLOR_BLUE, string);					  		newSpawn=1;							SetTimer("GameModeExitFunc", gRoundTime, 0);	}//==============================================================================new killerstate = GetPlayerState(killerid);	new killername[MAX_PLAYER_NAME];	if(IsPlayerInAnyVehicle(killerid) && !IsPlayerInAnyVehicle(playerid) && killerstate == PLAYER_STATE_DRIVER && reason != WEAPON_VEHICLE)			{		gDriveBy[killerid]++;	if(gDriveBy[killerid] == 1)	{Kick(killerid);//==============================================================================GetPlayerName(killerid,killername,sizeof(killername));new tempstr[256];format(tempstr, sizeof (tempstr), "*** %s (ID %d) został wyrzucony za używanie Drive-By!",killername,killerid);SendClientMessageToAll(COLOR_RED,tempstr);}}//============================================================================== return 1;}