gives wanted level to non govermnet team problem
#1

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
Reply
#2

Код:
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)