AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block pick up a nades from the floor (https://forums.alliedmods.net/showthread.php?t=184047)

Mr.Waffle 04-30-2012 08:32

block pick up a nades from the floor
 
hello ,
PHP Code:

public plugin_init() {
    
RegisterHam(Ham_Touch"armoury_entity""FwdHamPickupWeapon")
}
    
public 
FwdHamPickupWeapon( ) 
{        
    return 
HAM_SUPERCEDE;  


how can i block ONLY pick up Nades ?
thx.

dias 04-30-2012 10:13

Re: block pick up a nades from the floor
 
PHP Code:

public plugin_init()
{
    
RegisterHam(Ham_Touch"weaponbox""fw_TouchWeapon")
    
RegisterHam(Ham_Touch"armoury_entity""fw_TouchWeapon")
}

// Ham Weapon Touch Forward
public fw_TouchWeapon(weaponid)
{
    if(!
is_user_alive(id))
        return 
HAM_IGNORED

    
static classname[32]
    
pev(weaponpev_classnameclassnamesizeof(classname))

    if(
equal(classname"weapon_hegrenade"))
        return 
HAM_SUPERCEDE
    
    
return HAM_IGNORED;



Mr.Waffle 04-30-2012 15:26

Re: block pick up a nades from the floor
 
It doesn't work..


All times are GMT -4. The time now is 07:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.