View Single Post
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 08-20-2016 , 23:36   Re: [L4D2] Improved Prevent M60 Drop
Reply With Quote #6

Quote:
Originally Posted by cravenge View Post
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;
Whats the point in that O.o

If a entity is invalid it will return -1 anyway so it just becomes a useless check
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline