See this tutorial:
http://forums.alliedmods.net/showthread.php?t=52679
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "No ground weapon pickup"
#define VERSION "1.0"
#define AUTHOR "bugsy"
new g_MaxPlayers;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_Touch,"fwTouch");
g_MaxPlayers = get_maxplayers();
}
public fwTouch( ent , id )
{
if ( !( 1 <= id <= g_MaxPlayers ) || !pev_valid( ent ) || !( pev( ent , pev_flags ) & FL_ONGROUND ) )
return FMRES_IGNORED;
//This will block picking up all weapons except backpack (c4)
static szEntModel[32];
pev( ent , pev_model , szEntModel , 31 );
return equal( szEntModel , "models/w_backpack.mdl" ) ? FMRES_IGNORED : FMRES_SUPERCEDE;
}
__________________