Here some exaample how to use icons:
http://forums.alliedmods.net/showthread.php?p=53839
http://www.nsmod.org/forums/index.php?showtopic=5390
You need the message "ScoreInfo" for that and set msg_arg 6 to 512 and msg_arg 8 to iconname.
I dont post all code,only the recommmend
Code:
new ICON[33][36]; // icon they should display
public plugin_init()
{
//...
register_message(get_user_msgid("ScoreInfo"),"hook_scoreinfo");
}
public plugin_precache()
{
copy(ICON[id],35,"youriconname999")
new short_icon[33];
copy(short_icon,strlen(icon)-3,ICON[id]);//copy the icon without the numbers at end
new szPath[256];
format(szPath,255,"gfx/vgui/640_%s.tga",short_icon);
precache_generic(szPath)
}
public hook_scoreinfo()
{
new id=get_msg_arg_int(1);
set_msg_arg_int(6,ARG_SHORT,512)//need to set to 512 to enable custom icon
set_msg_arg_string(8,ICON[id])//ICON[id] hold the the icon,
}
__________________