SA-MP Forums Archive
gives wanted level to non govermnet team problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: gives wanted level to non govermnet team problem (/showthread.php?tid=443229)



gives wanted level to non govermnet team problem - dash5487 - 11.06.2013

hey i want if player in Non Goverment team if attack a goverment team then that player get wanted level

but this code will give also to goverment team if they attack the goverment team

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{

  if(damagedid != INVALID_PLAYER_ID||playerid != INVALID_PLAYER_ID)
    {
        if (gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY || gTeam[playerid] != TEAM_CIA) // check if the victim is from the same team as the shooter.
        {
        if (gTeam[damagedid] == TEAM_COP || gTeam[damagedid] == TEAM_ARMY || gTeam[damagedid] == TEAM_CIA){
   				 IncreaseWantedLevel(playerid,1);
   			 }

		}

	}
   return 1;
}
i also tired on player take damage but not worked


Re: gives wanted level to non govermnet team problem - Sascha - 11.06.2013

Код:
if (gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
not sure if that was everything, but at least you need to use AND and not OR... he shouldn't be a cop AND not in army AND not in cia:P