Hints:
1. It's possible to omit weapon index dynamical retrieval:
Code:
// from HLSDK
#define WEAPON_SNARK 15
2. It's possible to use a static variables declaration to increace performance especially in an intensive code areas. You migh be interested in review of the folowing article:
http://wiki.amxmodx.org/index.php/Optimizing_Plugins
3. It's possible to use only fakemeta instead of fakemeta and engine.
4. It's possible to shorten the block of code
Code:
if (wid != WPN_SNK)
return PLUGIN_CONTINUE
if (wammo != 0)
return PLUGIN_CONTINUE
if(!is_user_alive(id))
return PLUGIN_CONTINUE
to
Code:
if (wid != WPN_SNK || wammo || !is_user_alive(id))
return PLUGIN_CONTINUE
I'd not say that it's more efficient and this is not the case but i believe that in some of the cases it could increase a readability.