I think i'll do something like this
Code:
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Unknown"
#define PRIMARY_WEAPONS ((1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_GALIL) | (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) | (1<<CSW_AK47) | (1<<CSW_P90))
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
//register_event().
}
public event()
{
static Players[32], Num;
static Player;
get_players(Players, Num, "ach");
for(new i = 0 ; i < Num ; i++)
{
Player = Players[i];
static Weapons[32], WpnNum;
get_user_weapons(Player, Weapons, WpnNum);
for(new j = 0 ; j < WpnNum ; j++)
{
if(PRIMARY_WEAPONS & ( 1 << Weapons[j]))
{
static WpnName[32];
get_weaponname(Weapons[j], WpnName, sizeof WpnName - 1);
engclient_cmd(Player, WpnName);
}
}
}
}
__________________