HEADSHOT script won't work
#6

If unsure about the order of operators, use brackets. That condition is most probably interpreted as:

pawn Код:
if((issuerid != INVALID_PLAYER_ID && weaponid == 34) || (weaponid == 33 && bodypart == 9))
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:
pawn Код:
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33) && bodypart == 9)
Also got to love those "don't works" posts, without any explanation as to what exactly doesn't work.
Reply


Messages In This Thread
HEADSHOT script won't work - by Fantje - 13.03.2015, 21:25
Re: HEADSHOT script won't work - by CalvinC - 13.03.2015, 21:34
Re: HEADSHOT script won't work - by Fantje - 13.03.2015, 22:06
Respuesta: HEADSHOT script won't work - by JuanStone - 13.03.2015, 22:13
Re: HEADSHOT script won't work - by Fantje - 13.03.2015, 22:18
Re: HEADSHOT script won't work - by Vince - 13.03.2015, 22:18
Re: HEADSHOT script won't work - by Mijata - 13.03.2015, 22:26
Re: HEADSHOT script won't work - by Fantje - 14.03.2015, 09:16
Re: HEADSHOT script won't work - by CalvinC - 14.03.2015, 09:46

Forum Jump:


Users browsing this thread: 3 Guest(s)