Weapons Drop
#3

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....
Reply


Messages In This Thread
Weapons Drop - by Sting. - 02.01.2018, 11:40
Re: Weapons Drop - by Misiur - 02.01.2018, 13:59
Re: Weapons Drop - by Sting. - 02.01.2018, 18:05
Re: Weapons Drop - by Dayrion - 02.01.2018, 18:12
Re: Weapons Drop - by Sting. - 03.01.2018, 09:09
Re: Weapons Drop - by Dayrion - 03.01.2018, 16:48

Forum Jump:


Users browsing this thread: 3 Guest(s)