Code:
#include <amxmodx>
public plugin_init()
{
register_plugin ("get wep name", "0.1", "Silent_Killer")
register_clcmd ("getwepname", "getwep", ADMIN_KICK, "Gets your weapons name")
}
public getwep (id, level, cid)
{
new temp[2]
get_weaponname(get_user_weapon(id,temp[0],temp[1], wepname, 31)
client_print(id, print_chat, "Your weapon name is currently %s!", wepname)
return PLUGIN_HANDLED
}
what u had it doing was get_weaponname for the player's id, not the weapon's id..say ur id is 1....then itll return the weapon name for weapon #1.......what u wanna do is find the waeponname of the weapon the player is holding, get_user_weapon returns that value