Hallo,
Es kommt kein Gangfight kill. Und die ein Punkt kommt auch nicht
OnPlayerDeath:
if(IsAFightFaction(GetPlayerFaction(playerid))){
new TempZone = GetPlayerFightzone(playerid);
if(FightSystem[TempZone][fsAttackFaction] != -255 && FightSystem[TempZone][fsFightTime]){
if(FightSystem[TempZone][fsCtfOfOwner][0] == playerid){
new fsName[MAX_PLAYER_NAME];
GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
new fsText[128];
format(fsText,sizeof(fsText),">>> Gangfight <<< | %s hat die Flagge fallen gelassen!",fsName);
for(new i;i<GetMaxPlayers();i++){
if(IsPlayerConnected(i)){
if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[TempZone][fsAttackFaction]){
PlayerPlaySound(i,1058,0.0,0.0,0.0);
SendClientMessage(i,FS_COL_YELLOW,fsText);
}
}
}
DestroyObject(FightSystem[TempZone][fsFlagOfOwner]);
FightSystem[TempZone][fsFlagOfOwner] = CreateObject(2993,FightSystem[TempZone][fsCtfOfOwnerx],FightSystem[TempZone][fsCtfOfOwnery],(FightSystem[TempZone][fsCtfOfOwnerz]-1.0),0.0,0.0,0.0,150.0);
FightSystem[TempZone][fsCtfOfOwner][0] = -255;
FightSystem[TempZone][fsCtfOfOwner][1] = 0;
}
else if(FightSystem[TempZone][fsCtfOfAttack][0] == playerid){
new fsName[MAX_PLAYER_NAME];
GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
new fsText[128];
format(fsText,sizeof(fsText),">>> Gangfight <<< | %s hat die Flagge fallen gelassen!",fsName);
for(new i;i<GetMaxPlayers();i++){
if(IsPlayerConnected(i)){
if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[TempZone][fsAttackFaction]){
PlayerPlaySound(i,1058,0.0,0.0,0.0);
SendClientMessage(i,FS_COL_YELLOW,fsText);
}
}
}
DestroyObject(FightSystem[TempZone][fsFlagOfAttack]);
FightSystem[TempZone][fsFlagOfAttack] = CreateObject(2993,FightSystem[TempZone][fsCtfOfAttackx],FightSystem[TempZone][fsCtfOfAttacky],(FightSystem[TempZone][fsCtfOfAttackz]-1.0),0.0,0.0,0.0,150.0);
FightSystem[TempZone][fsCtfOfAttack][0] = -255;
FightSystem[TempZone][fsCtfOfAttack][1] = 0;
}
}
}
if(IsPlayerConnected(killerid)){
if(IsAFightFaction(GetPlayerFaction(killerid))){
new TempZone = GetPlayerFightzone(killerid);
if(TempZone != -255){
if(FightSystem[TempZone][fsFightTime] && FightSystem[TempZone][fsAttackFaction] != -255){
if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(killerid) || FightSystem[TempZone][fsAttackFaction] == GetPlayerFaction(killerid)){
if(IsAFightFaction(GetPlayerFaction(playerid))){
new fsText[64];
if(FightSystem[TempZone][fsAttackFaction] == GetPlayerFaction(killerid) && FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid)){
PlayerPlaySound(killerid,1084,0.0,0.0,0.0);
GameTextForPlayer(killerid,"~g~GANGFIGHTKILL",3125,3);
GameTextForPlayer(playerid,"~r~GANGFIGHTKILL",3125,3);
FightSystem[TempZone][fsKillsOfAttack]++;
if(FightSystem[TempZone][fsKillsOfOwner] > FightSystem[TempZone][fsKillsOfAttack]){
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}
else if(FightSystem[TempZone][fsKillsOfAttack] > FightSystem[TempZone][fsKillsOfOwner]){
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}else{
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}
}
else if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(killerid) && FightSystem[TempZone][fsAttackFaction] == GetPlayerFaction(playerid)){
PlayerPlaySound(killerid,1084,0.0,0.0,0.0);
GameTextForPlayer(killerid,"~g~GANGFIGHTKILL",3125,3);
GameTextForPlayer(playerid,"~r~GANGFIGHTKILL",3125,3);
FightSystem[TempZone][fsKillsOfOwner]++;
if(FightSystem[TempZone][fsKillsOfOwner] > FightSystem[TempZone][fsKillsOfAttack]){
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}
else if(FightSystem[TempZone][fsKillsOfAttack] > FightSystem[TempZone][fsKillsOfOwner]){
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}else{
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsOwnerFaction]));
TextDrawSetString(FightSystem[TempZone][fsWinFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfOwner]);
TextDrawSetString(FightSystem[TempZone][fsWinKills],fsText);
format(fsText,sizeof(fsText),"%s",GetFactionNameOfFaction(FightSystem[TempZone][fsAttackFaction]));
TextDrawSetString(FightSystem[TempZone][fsLoseFaction],fsText);
format(fsText,sizeof(fsText),"%02d Punkte",FightSystem[TempZone][fsKillsOfAttack]);
TextDrawSetString(FightSystem[TempZone][fsLoseKills],fsText);
}
}
}
}
}
}
}
}