Weapons Drop
#5

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(!(
<= 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 
2224ForbiddenWeaponsDrop[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] = false0;
    else
        return 
ForbiddenWeaponsDrop[weaponid] = false1;

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...
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: 1 Guest(s)