Quote:
Originally Posted by Dayrion
Change in switch, case statement which weapon you want to forbid.
PHP код:
public ForbidWeaponDrop(weaponid) // return 1 if the weapon is forbidden, return 0 is the weapon isn't
{
if(!(0 <= weaponid <= 46) && (19 <= weaponid <= 21)) // if the weapon is valid - < 46 or between 19 & 21
{
ForbiddenWeaponsDrop[weaponid] = true;
return 1;
}
else
{
switch(weaponid) // we check, case by case
{
case 22, 24: ForbiddenWeaponsDrop[weaponid] = true;
default : return 0;
}
}
return 1;
}
public FreeWeaponDrop(weaponid) // if a weapon is forbidden, it can not be authorized
{
if(ForbidWeaponDrop(weaponid))
return ForbiddenWeaponsDrop[weaponid] = false, 0;
else
return ForbiddenWeaponsDrop[weaponid] = false, 1;
}
By the way, I don't know why do you use ForbiddenWeaponsDrop?
|
I'm using it cause its where you put the ID's of the weapons you restrict right? According to Insanity's script.
I also tried your code, unfortunately the damn colt and shotgun is still dropping as pickups... No idea why...