27.01.2012, 23:17
Hello,i've maked this code OnPlayerDeath.
Everything works fine,except one thing.
The "WARNING ALL COPS etc" need to show ONLY at TEAM_COP and not to TEAM_CIV.
How to fix this?
pawn Код:
if(gTeam[killerid] == TEAM_CIV && gTeam[playerid] == TEAM_COP)
{
new plwl = GetPlayerWantedLevel(killerid);
plwl = GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid,plwl +6);
new string2[135];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "- MURDER - You have murdered %s (%d) - Wanted Level: %d",pname,playerid,plwl);
SendClientMessage(killerid,red,string2);
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[i];
if(gTeam[playerid] == TEAM_COP)
{
new copmsg[170];
new kname[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(kname));
GetPlayerName(killerid, kname, sizeof(kname));
format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: %s (%d) murdered %s (%d) at %s",kname,killerid,name,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_BLUE, copmsg);
}
}
}
The "WARNING ALL COPS etc" need to show ONLY at TEAM_COP and not to TEAM_CIV.
How to fix this?