Quote:
Originally Posted by Misiur
Well, first look at the logic you have right now:
pawn Код:
weaponid = (weaponid > 46 || weaponid < 0) ? (0) : (weaponid); weaponid = (weaponid > 22 || weaponid < 0) ? (0) : (weaponid); weaponid = (weaponid > 25 || weaponid < 0) ? (0) : (weaponid);
Each line says "if weapon id is bigger than X or less than 0, return 0, otherwise return weapon id". First line prevents banning all weapons with ids (-Inf; 0) U (46; Inf), second line (-Inf; 0) U (22; Inf), third (-Inf; 0) U (25; Inf). Now when you sum it up, you get (-Inf; 0) U (22; Inf), i.e you could remove all lines except middle one to get exactly the same result. I think you wanted something more like:
pawn Код:
weaponid = (weaponid > 46 || weaponid < 0) ? (0) : (weaponid); if (!(weaponid == 22 || weaponid == 25)) weaponid = 0;
|
Hmmm, I tried it, and I tested it, I still drop the colt and shotgun and am still able to pick em up....