13.03.2015, 22:18
If unsure about the order of operators, use brackets. That condition is most probably interpreted as:
Which means that this condition will be true if:
- the issuer is valid and uses weapon 34
OR
- the issuer uses weapon 33 to hit bodypart 9.
What you want is probably this:
Also got to love those "don't works" posts, without any explanation as to what exactly doesn't work.
pawn Код:
if((issuerid != INVALID_PLAYER_ID && weaponid == 34) || (weaponid == 33 && bodypart == 9))
- the issuer is valid and uses weapon 34
OR
- the issuer uses weapon 33 to hit bodypart 9.
What you want is probably this:
pawn Код:
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33) && bodypart == 9)