21.01.2016, 15:52
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(InTeamDM[playerid] == 1 && InTeamDM[damagedid] == 1)
{
if(PlayerTeam[playerid] == PlayerTeam[damagedid])
{
GameTextForPlayer(playerid,"~r~DO NOT ATTACK YOU TEAM MATES", 5000, 3);
}
return 1;
}
if(pctp[playerid] == 1 && pctp[damagedid] == 1)
{
if(GetPlayerTeam(playerid) == GetPlayerTeam(damagedid))
{
GameTextForPlayer(playerid,"~r~DO NOT ATTACK YOU TEAM MATES", 5000, 3);
}
return 1;
}
return 1;
}
but it works correct when the players are in TeamDm or pctp. but when there pctp and teamdm variables are = 0; means when they are not in teamDm or pctp.. message doesn't show that don't attack team mates it okk but health is not getting decreased..
please help!