War System Problem
#1

Hello, sa-mp community,like title says,i have a problem with my war system. . .
If an player use /joinwar,everything it's ok,but when he kill an enemy the system will not count the kill,but if he's not in /joinwar the system will count the kill and i don't understand where might be the problem.Down there you will see the script that count the kills
Код:
	if(takezone == 0 && WarInfo[pWarOn] == 1)
	{
		if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pInWar] == 1)
			{
	            	new killer[MAX_PLAYER_NAME];
	            	GetPlayerName(killerid, killer, sizeof(killer));
	            	format(string,128,"[WAR] %s The Mafia has killed %s The Triads and received 2500$.",killer,name);
	            	SendmfiMessage(COLOR_1GREEN, string);
	            	format(string,128,"[WAR] %s The Triads was pwned by %s The Mafia and lost 2500$.",name,killer);
	            	SendthrMessage(COLOR_1BLUE, string);
		        	GivePlayerMoney(killerid, 2500);
		        	WarInfo[pMafia]++;
		        	WarInfo[pAlliance1]++;
		        	format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        	TextDrawSetString(Textdraw2, string);
		        	format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        	TextDrawSetString(Textdraw6, string);
		        	TextDrawShowForAll(Textdraw2);
		        	TextDrawShowForAll(Textdraw6);
		        	return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pInWar] == 1)
			{
	            	new killer[MAX_PLAYER_NAME];
	            	GetPlayerName(killerid, killer, sizeof(killer));
	            	format(string,128,"[WAR] %s The Triads has killed %s The Mafia and received 2500$.",killer,name);
	            	SendthrMessage(COLOR_1GREEN, string);
	            	format(string,128,"[WAR] %s The Mafia was pwned by %s The Triads and lost 2500$.",name,killer);
	            	SendmfiMessage(COLOR_1BLUE, string);
		        	GivePlayerMoney(killerid, 2500);
		        	WarInfo[pAlliance2]++;
		        	WarInfo[pTriads]++;
		        	format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        	TextDrawSetString(Textdraw3, string);
		        	format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        	TextDrawSetString(Textdraw7, string);
		        	TextDrawShowForAll(Textdraw3);
		        	TextDrawShowForAll(Textdraw7);
		        	return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Grove Street has killed %s Ballas and received 2500$.",killer,name);
	            SendBZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Ballas was pwned by %s Grove Street and lost 2500$.",name,killer);
	            SendCZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pGrove]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Ballas has killed %s Grove Street and received 2500$.",killer,name);
	            SendCZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Grove Street was pwned by %s Ballas and lost 2500$.",name,killer);
	            SendBZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pBallas]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 2;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Los Santos Vagos has killed %s Varrios Los Aztecas and received 2500$.",killer,name);
	            SendNTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Varrios Los Aztecas was pwned by %s Los Santos Vagos and lost 2500$.",name,killer);
	            SendSTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pVagos]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Varrios Los Aztecas has killed %s Los Santos Vagos and received 2500$.",killer,name);
	            SendSTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Los Santos Vagos was pwned by %s Varrios Los Aztecas and lost 2500$.",name,killer);
	            SendNTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pAztecas]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s The Mafia has killed %s Grove Street and received 2500$.",killer,name);
	            SendmfiMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Grove Street was pwned by %s The Mafia and lost 2500$.",name,killer);
	            SendBZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pMafia]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s The Mafia has killed %s Varrios Los Aztecas and received 2500$.",killer,name);
	            SendmfiMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Varrios Los Aztecas was pwned by %s The Mafia and lost 2500$.",name,killer);
	            SendSTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pMafia]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s The Triads has killed %s Ballas and received 2500$.",killer,name);
	            SendthrMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Ballas was pwned by %s The Triads and lost 2500$.",name,killer);
	            SendCZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pTriads]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s The Triads has killed %s Los Santos Vagos and received 2500$.",killer,name);
	            SendthrMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Los Santos Vagos was pwned by %s The Triads and lost 2500$.",name,killer);
	            SendNTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pTriads]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Grove Street has killed %s The Mafia and received 2500$.",killer,name);
	            SendBZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Mafia was pwned by %s Grove Street and lost 2500$.",name,killer);
	            SendmfiMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pGrove]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Grove Street has killed %s Los Santos Vagos and received 2500$.",killer,name);
	            SendBZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Los Santos Vagos was pwned by %s Grove Street and lost 2500$.",name,killer);
	            SendNTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
		        WarInfo[pGrove]++;
		        format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Ballas has killed %s The Triads and received 2500$.",killer,name);
	            SendCZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s The Triads was pwned by %s Ballas and lost 2500$.",name,killer);
	            SendthrMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pBallas]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Ballas has killed %s Varrios Los Aztecas and received 2500$.",killer,name);
	            SendCZMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Varrios Los Aztecas was pwned by %s Ballas and lost 2500$.",name,killer);
	            SendSTMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pBallas]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Los Santos Vagos has killed %s The Triads and received 2500$.",killer,name);
	            SendNTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s The Triads was pwned by %s Los Santos Vagos and lost 2500$.",name,killer);
	            SendthrMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pVagos]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Los Santos Vagos has killed %s Grove Street and received 2500$.",killer,name);
	            SendNTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Grove Street was pwned by %s Los Santos Vagos and lost 2500$.",name,killer);
	            SendBZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance1]++;
		        WarInfo[pVagos]++;
		        format(string, sizeof(string), "~r~Mafia~w~-%d~n~~p~Ballas~w~-%d~y~~n~Vagos~w~-%d",WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos]);
		        TextDrawSetString(Textdraw2, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance1]);
		        TextDrawSetString(Textdraw6, string);
		        TextDrawShowForAll(Textdraw2);
		        TextDrawShowForAll(Textdraw6);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Varrios Los Aztecas has killed %s The Mafia and received 2500$.",killer,name);
	            SendSTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s The Mafia was pwned by %s Varrios Los Aztecas and lost 2500$.",name,killer);
	            SendmfiMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
		        WarInfo[pAlliance2]++;
                WarInfo[pAztecas]++;
                format(string, sizeof(string), "~w~%d-~p~~h~~h~Triads~n~~w~%d-~g~Grove~n~~w~%d-~b~~h~~h~~h~Aztecas",WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
		        TextDrawSetString(Textdraw3, string);
		        format(string, sizeof(string), "%d",WarInfo[pAlliance2]);
		        TextDrawSetString(Textdraw7, string);
		        TextDrawShowForAll(Textdraw3);
		        TextDrawShowForAll(Textdraw7);
		        return 1;
	        }
		}
		if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15 || PlayerInfo[killerid][pInWar] == 1)
		{
			if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pInWar] == 1)
			{
	            new killer[MAX_PLAYER_NAME];
	            GetPlayerName(killerid, killer, sizeof(killer));
	            format(string,128,"[WAR] %s Varrios Los Aztecas has killed %s Ballas and received 2500$.",killer,name);
	            SendSTMessage(COLOR_1GREEN, string);
	            format(string,128,"[WAR] %s Ballas was pwned by %s Varrios Los Aztecas and lost 2500$.",name,killer);
	            SendCZMessage(COLOR_1BLUE, string);
		        GivePlayerMoney(killerid, 2500);
                WarInfo[pAlliance2]++;
		        return 1;
	        }
		}
	}
These are my variables for war
Код:
enum pWar
{
	pMafia,
	pTriads,
	pGrove,
	pBallas,
	pVagos,
	pAztecas,
	pAlliance1,
	pAlliance2,
	pWarOn,
	StartingWAR,
	warfb
}
new WarInfo[pWar];
This will announce and start the war!
Код:
forward AnnounceWAR();
public AnnounceWAR()
{
	SendClientMessageToAll(COLOR_WHITE, "[{FF0000}OldSkull{FFFFFF}] {FF0000}WAR-ul{C0C0C0} va incepe in {FF0000}30{C0C0C0} secunde!");
	WarInfo[StartingWAR] = 0;
	SetTimer("WAR", 30000, 0);
	return 1;
}

forward WAR();
public WAR()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerInfo[i][pInWar] == 1)
	        {
	            new rand = random(sizeof(warRandomSpawns));
	            SetPlayerPos(i, warRandomSpawns[rand][0], warRandomSpawns[rand][1], warRandomSpawns[rand][2]);
	            SetPlayerFacingAngle(i, warRandomSpawns[rand][3]);
	            SetPlayerVirtualWorld(i, 20);
	            SetPlayerInterior(i, 0);
	            SetPlayerHealth(i, 100);
				TogglePlayerControllable(i, 0);
			}
		}
	}
	
	WarInfo[pWarOn] = 1;
	SendClientMessageToAll(COLOR_WHITE, "{FF0000}[OldSkull]: {C0C0C0}{FF0000}WAR-ul{C0C0C0} va incepe acum!");
	
	SetTimer("warcd", 1000, false);
	SetTimer("warcd2", 2000, false);
	SetTimer("warcd3", 3000, false);
	SetTimer("warcd4", 4000, false);
	SetTimer("warcd5", 5000, false);
	SetTimer("warcd6", 6000, false);
	
	return 1;
}

forward warcd1();
forward warcd2();
forward warcd3();
forward warcd4();
forward warcd5();
forward warcd6();

public warcd1()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~5",1000,4);
			}
		}
	}
	return 1;
}

public warcd2()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~4",1000,4);
			}
		}
	}
	return 1;
}

public warcd3()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~3",1000,4);
			}
		}
	}
	return 1;
}

public warcd4()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~2",1000,4);
			}
		}
	}
	return 1;
}

public warcd5()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~1",1000,4);
			}
		}
	}
	return 1;
}

public warcd6()
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pInWar] == 1)
			{
				GameTextForPlayer(i,"~r~WAR Countdown : ~n~~n~~g~Succes",1000,4);
				TogglePlayerControllable(i, 1);
			}
		}
	}
	return 1;
}
That will spawn a player that is joined in the war after he get killed
Код:
	    if(PlayerInfo[playerid][pInWar] == 1 && WarInfo[pWarOn])
		{
			new rand = random(sizeof(warRandomSpawns));
			SetPlayerPos(playerid, warRandomSpawns[rand][0], warRandomSpawns[rand][1], warRandomSpawns[rand][2]);
			SetPlayerFacingAngle(playerid, warRandomSpawns[rand][3]);
			SetPlayerVirtualWorld(playerid, 20);
			SetPlayerHealth(playerid, 100);
			ClearCrime(playerid);
			WantedLevel[playerid] = 0;
			WantedPoints[playerid] = 0;
			return 1;
		}
This will announce firstblood of the war
Код:
   if(PlayerInfo[killerid][pInWar] == 1 && WarInfo[pWarOn] == 1)
	{
		if(!WarInfo[warfb])
		{
			for(new i; i <= MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
					if(PlayerInfo[i][pInWar] == 1)
					{
						format(str, 128, "~r~%s ~y~ draw firstblood on ~g~%s", PlayerName(killerid), PlayerName(playerid));
						GameTextForPlayer(i, str, 4000, 3);
					}
				}
			}
			WarInfo[warfb] = 1;
		}
		ClearCrime(playerid);
		WantedLevel[playerid] = 0;
		WantedPoints[playerid] = 0;
		return 1;
	}
That says the war is over
Код:
forward WarOver();
public WarOver()
{
	new string[256];
	format(string,256," The War it's over %d-%d.Mafia,Ballas,Vagos,Da Nang vs Triads,Grove,Aztecas,Rifa",WarInfo[pAlliance1],WarInfo[pAlliance2]);
	SendClientMessageToAll(COLOR_LIGHTBLUE,string);
	SendClientMessageToAll(COLOR_LIGHTBLUE, "Scrie /warstats ca sa vezi statisticile!");
	WarInfo[pWarOn] = 0;
	for(new i; i < MAX_PLAYERS; i ++)
	{
		if(IsPlayerConnected(i))
		{
			TextDrawHideForPlayer(i, Textdraw0);
			TextDrawHideForPlayer(i, Textdraw1);
			TextDrawHideForPlayer(i, Textdraw2);
			TextDrawHideForPlayer(i, Textdraw3);
			TextDrawHideForPlayer(i, Textdraw4);
			TextDrawHideForPlayer(i, Textdraw5);
			TextDrawHideForPlayer(i, Textdraw6);
			TextDrawHideForPlayer(i, Textdraw7);
			GameTextForPlayer(i, "~g~The War is over",3000,0);
		}
	}
}
This means that when the war is over,all players that have [pInWar] == 1 will set to 0
Код:
		if(WarInfo[pWarOn] == 0)
		{
		    PlayerInfo[playerid][pInWar] = 0;
		}
And this is for start/stop/stats/joinwar of my system
Код:
	if(strcmp(cmd, "/startwar", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1337)
	    {
			if(WarInfo[pWarOn] == 0)
			{
			    GameTextForAll("~g~The WAR was started !", 3000, 0);
			    WarInfo[pWarOn] = 1;
			    WarInfo[StartingWAR] = 1;
			    SetTimer("AnnounceWAR", 10000, 0);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "*War was started by Admin %s",sendername);
				SendClientMessageToAll(COLOR_RED, string);
				SendClientMessageToAll(COLOR_WHITE, "Foloseste {FF0000}/joinwar{FFFFFF} pentru a intra la WAR!");
				WarInfo[pBallas] = 0;
				WarInfo[pAztecas] = 0;
				WarInfo[pVagos] = 0;
				WarInfo[pMafia] = 0;
				WarInfo[pGrove] = 0;
				WarInfo[pTriads] = 0;
				WarInfo[pAlliance1] = 0;
				WarInfo[pAlliance2] = 0;

    			for(new i; i < MAX_PLAYERS; i ++)
				{
					if(IsPlayerConnected(i))
					{
						TextDrawShowForPlayer(i, Textdraw0);
						TextDrawShowForPlayer(i, Textdraw1);
						TextDrawShowForPlayer(i, Textdraw2);
						TextDrawShowForPlayer(i, Textdraw3);
						TextDrawShowForPlayer(i, Textdraw4);
						TextDrawShowForPlayer(i, Textdraw5);
						TextDrawShowForPlayer(i, Textdraw6);
						TextDrawShowForPlayer(i, Textdraw7);
					}
   				}
				timerwar = SetTimer("WarOver",wartime,0);
			}
			else SCM(playerid, COLOR_GREY, " The {FF0000}War{C0C0C0} is already started !");
	    }
	    else SCM(playerid, COLOR_LIGHTBLUE, "* You're not authorized to use that command!");
	    return 1;
	}
	if(strcmp(cmd, "/warstats", true) == 0)
	{
 		new info[1000];
 		if(WarInfo[pWarOn] == 1)
		{
		format(info, sizeof(info), "{FFFFFF}Alliance I - %d\n\n{FF0000}Mafia {FFFFFF}- %d\n{A209B3}Ballas {FFFFFF}- %d\n{FFD900}Vagos {FFFFFF}- %d\n\n\n{FFFFFF}Alliance II - %d\n\n{B88C14}TheTriads{FFFFFF} - %d\n{3EAD11}Grove{FFFFFF} - %d\n{00FBFF}Aztecas{FFFFFF} - %d",WarInfo[pAlliance1],WarInfo[pMafia],WarInfo[pBallas],WarInfo[pVagos],WarInfo[pAlliance2],WarInfo[pTriads],WarInfo[pGrove],WarInfo[pAztecas]);
	    ShowPlayerDialog(playerid, 9323,DIALOG_STYLE_MSGBOX, "War Statistics", info ,"Close","");
	    }
	    else SendClientMessage(playerid, COLOR_WHITE, "Nu este niciun {33ff33}WAR{ffffff} pornit.");
	   	return 1;

	}
    if(strcmp(cmd, "/warover", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1337)
	    {
		    if(WarInfo[pWarOn] == 1)
		    {
		        WarInfo[pWarOn] = 0;
		        WarInfo[pBallas] = 0;
				WarInfo[pAztecas] = 0;
				WarInfo[pVagos] = 0;
				WarInfo[pMafia] = 0;
				WarInfo[pGrove] = 0;
				WarInfo[pTriads] = 0;
				WarInfo[pAlliance1] = 0;
				WarInfo[pAlliance2] = 0;
				KillTimer(timerwar);
				for(new i = 0; i <= MAX_PLAYERS; i++)
					{
						if(IsPlayerConnected(i))
						{
							if(PlayerInfo[i][pInWar] > 0)
							{
							    PlayerInfo[i][pInWar] = 0;
								ResetPlayerWeapons(i);
								SpawnPlayer(i);
								SetPlayerWorldBounds(i, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
								WarInfo[warfb] = 0;
							}
						}
					}
					
				for(new i; i < MAX_PLAYERS; i ++)
				{
					if(IsPlayerConnected(i))
					{
						TextDrawHideForPlayer(i, Textdraw0);
						TextDrawHideForPlayer(i, Textdraw1);
						TextDrawHideForPlayer(i, Textdraw2);
						TextDrawHideForPlayer(i, Textdraw3);
						TextDrawHideForPlayer(i, Textdraw4);
						TextDrawHideForPlayer(i, Textdraw5);
						TextDrawHideForPlayer(i, Textdraw6);
						TextDrawHideForPlayer(i, Textdraw7);
					}
				}
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, 128, "*{DB0000}WAR {ffffff}has been stopped by Admin {FF0000}%s",sendername);
				SendClientMessageToAll(COLOR_WHITE, string);
			}
			else SCM(playerid, COLOR_WHITE, "* The {FF0000}War{ffffff} is already off!");
		}
		else SCM(playerid, COLOR_GREY, "You are not authorized to use the command. ");
		return 1;
	}
 	if(strcmp(cmd, "/joinwar", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(WantedLevel[playerid] >= 1)
            {
                SendClientMessage(playerid,COLOR_GREY,"   You can`t use this command, you are currently Wanted !");
                return 1;
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == 11)
			if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 11)
            {
                SendClientMessage(playerid,COLOR_GREY,"   Nu poti intra la war,nu faci parte dintr-o mafie sau dintr-un gang!");
                return 1;
            }
			if(PlayerInfo[playerid][pInWar] == 1)
			{
				SendClientMessage(playerid,COLOR_WHITE,"{C0C0C0}Esti deja la {DB0000}WAR{FFFFFF}!");
				return 1;
			}
			if(HuntedPlayer == playerid)
			{
				SendClientMessage(playerid,COLOR_WHITE,"* Nu poti intra la {DB0000}WAR {FFFFFF}atata timp cat esti inscris in {2BD580}Hunting Event{FFFFFF}!");
				return 1;
			}
			if(WarInfo[pWarOn] == 1)
			{
				SendClientMessage(playerid, COLOR_GREY, "{FF0000}[OldSkull]: {C0C0C0}Te-ai inscris la {DB0000}WAR!");
				PlayerInfo[playerid][pInWar] = 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "{FF0000}[OldSkull]: WAR-ul{C0C0C0} nu este in curs de desfasurare!");
				return 1;
			}
		}
		return 1;
	}
I gave you all of my script about this war system.I repeat,my problem is counting kills,if i use /joinwar no counting,if i don't my system count kills!
P.S.: Sorry for my bad english!
Reply
#2

Someone who could help me??
Reply
#3

Show me onplayerdeath.
Reply
#4

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new name[MAX_PLAYER_NAME];
	new string[256];
	new str[128];
	GetPlayerName(killerid, name, sizeof(name));
	format(string, sizeof(string), "Ai fost omorat de %s", name);
	SendClientMessage(playerid, COLOR_1BLUE, string);

/*if(IsWar && killerid != INVALID_PLAYER_ID) Killing[gTeam[killerid]]++; // OnPlayerDeath
	Killing[PlayerInfo[killerid][pLeader]]++;
	Killing[PlayerInfo[killerid][pMember]]++;*/
///mission//
    if(PlayerOnMission13[playerid] == 1 || PlayerOnMission14[playerid] == 1 || PlayerOnMission15[playerid] == 1 || PlayerOnMission16[playerid] == 1)
	{
	    PlayerOnMission13[playerid] = 0;
	    PlayerOnMission14[playerid] = 0;
	    PlayerOnMission15[playerid] = 0;
	    PlayerOnMission16[playerid] = 0;
	    DisablePlayerCheckpoint(playerid);
		new killer[MAX_PLAYER_NAME];
 		new mort[MAX_PLAYER_NAME];
 		GetPlayerName(playerid, mort, sizeof(mort));
 		GetPlayerName(killerid, killer, sizeof(killer));
		format(string, sizeof(string), "%s l-a omorat pe %s in timp ce facea misiunea si a catigat 50.000$", killer, mort);
		SendClientMessageToAll(0xFF0000FF, string);
		GivePlayerMoney(killerid, 50000);
    	return 1;
   	}
Here is!
Reply
#5

Hmm sorry but I don't think that you showed all of it try to show everything that consists "Killing"
Reply
#6

unfortunately,that
Код:
/*if(IsWar && killerid != INVALID_PLAYER_ID) Killing[gTeam[killerid]]++; // OnPlayerDeath
	Killing[PlayerInfo[killerid][pLeader]]++;
	Killing[PlayerInfo[killerid][pMember]]++;*/
is from old war system,which I removed from my script. . .so,in first post you're gonna see all of my war system,and in "OnPlayerDeath" was nothin' for that!
Reply
#7

Bump!!!!
Reply
#8

For OnPlayerDeath Add a line saying DisablePlayerDeath; or something like that according to what your saying the script should work like a fake kill but without showing in death log
Reply
#9

Sorry,I don't understand
Reply
#10

Someone else could help me please? No offence Wingman and Eth but you don't gave to me some important advices!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)