View Single Post
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 08-20-2016 , 21:35   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #4

MasterMind, I advice you to always check if the "m_hActiveWeapon" netprop returns -1 because it produces errors about "Entity index -1 is invalid".

Code:
new Weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
if(Weapon == -1 || !IsValidEntity(Weapon))
    return Plugin_Continue;
cravenge is offline