Try doing like this:
PHP Code:
/*Before plugin init*/
new const weaponnames[][] =
{
"awp", "sg550", "g3sg1", "scout", "m249" //And so on
}
/*In plugin init*/
for(new i = 0; i < sizeof weaponnames; i++)
register_clcmd(weaponnames[i], "HandleCmd")
/*After plugin init*/
public HandleCmd(id)
{
client_print( id, print_center, "This weapon is restricted!" );
return PLUGIN_HANDLED
}
This method should fix all your problems.