You may want to use trie to convert player friendly names into entity names.
Somewhere OnPluginStart:
PHP Code:
SetTrieString(yourtrie, "bat", "tf_weapon_bat");
And then in cmd body:
PHP Code:
GetCmdArg(1, weapon, 64);
if (GetTrieString(yourtrie, weapon, entity, 64)) {
entindex = GivePlayerItem(client, entity);
//etc.