Ich habe eingefügt das wenn ein Spieler mit Wanteds getötet wird folgendes, im Chat erscheint
Polizist %s tötet Verbrecher %s
Aber jetzt spamt der das oben, also wenn 2 Cops neben dem stehen, steht da 2x oben! ..
Hier der Code:
if(PlayerInfo[i][pMember] == 1 PlayerInfo[i][pLeader] == 1)
{
new OName[MAX_PLAYER_NAME],VName[MAX_PLAYER_NAME];
GetPlayerName(i,OName,sizeof(OName));
GetPlayerName(playerid,VName,sizeof(VName));
format(string,sizeof(string),"<< Polizist %s tötet Verbrecher %s >>",OName,VName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
}
if(PlayerInfo[i][pMember] == 2 PlayerInfo[i][pLeader] == 2)
{
new OName[MAX_PLAYER_NAME],VName[MAX_PLAYER_NAME];
GetPlayerName(i,OName,sizeof(OName));
GetPlayerName(playerid,VName,sizeof(VName));
format(string,sizeof(string),"<< Agent %s tötet Verbrecher %s >>",OName,VName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
}
if(PlayerInfo[i][pMember] == 3 PlayerInfo[i][pLeader] == 3)
{
new OName[MAX_PLAYER_NAME],VName[MAX_PLAYER_NAME];
GetPlayerName(i,OName,sizeof(OName));
GetPlayerName(playerid,VName,sizeof(VName));
format(string,sizeof(string),"<< Soldat %s tötet Verbrecher %s >>",OName,VName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
}
if(PlayerInfo[i][pMember] == 22 PlayerInfo[i][pLeader] == 22)
{
new OName[MAX_PLAYER_NAME],VName[MAX_PLAYER_NAME];
GetPlayerName(i,OName,sizeof(OName));
GetPlayerName(playerid,VName,sizeof(VName));
format(string,sizeof(string),"<< SWAT Einheit tötet Verbrecher %s >>",VName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
}