Thread: [Solved] Items are glow
View Single Post
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-05-2017 , 06:01   Re: [L4D2]Items are glow
Reply With Quote #24

Quote:
Originally Posted by Silvers View Post
PHP Code:
        HookEvent("spawner_give_item",            Event_SpawnerGiveItem);

    new 
flag GetEntProp(entProp_Data"m_spawnflags");
    if( 
flag & (1<<3) ) return;    // Infinite ammo
    
new value GetEntProp(entProp_Data"m_itemCount");
    if( 
value )    return;        // We only need to delete if theres 1 item at the spawn 
etc, from Gear Transfer.
Yeah, I was only checking for m_itemCount == 1, which seems to be wrong when it comes to the grenade launcher.

Before:
https://steamuserimages-a.akamaihd.n...8370BEACBED58/
After:
https://steamuserimages-a.akamaihd.n...7F5AECB3059F7/

Version 1.1.6
-m_itemCount fix.
-The chainsaw is now classed as melee rather than a weapon.

To do list:
Make it compatible with sdkhooks (OnEntityCreated and SDKHook_WeaponDropPost but I've only faced bugs so far)
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_items_glow.sp - 487 views - 11.9 KB)

Last edited by Visual77; 06-05-2017 at 07:00.
Visual77 is offline