As a stock :
PHP Code:
stock Send_StatusIcon(id, iStatus, szIcon[], iRed, iGreen, iBlue, bool:bReliable=false)
{
static iStatusIcon
message_begin(bReliable ? MSG_ONE : MSG_ONE_UNRELIABLE, iStatusIcon || (iStatusIcon = get_user_msgid("StatusIcon")), .player=id);
{
write_byte( clamp(iStatus, 0, 2) ); // status (0=hide, 1=show, 2=flash)
write_string( szIcon ); // sprite name
write_byte( clamp(iRed, 0, 255) ); // red
write_byte( clamp(iGreen, 0, 255) ); // green
write_byte( clamp(iBlue, 0, 255) ); // blue
}
message_end();
}
In a plugin :
PHP Code:
new g_iStatusIcon
public plugin_init()
{
g_iStatusIcon = get_user_msgid("StatusIcon")
}
Send_StatusIcon(id, iStatus, szIcon[], iRed, iGreen, iBlue, bool:bReliable=false)
{
message_begin(bReliable ? MSG_ONE : MSG_ONE_UNRELIABLE, g_iStatusIcon, .player=id);
{
write_byte( clamp(iStatus, 0, 2) ); // status (0=hide, 1=show, 2=flash)
write_string( szIcon ); // sprite name
write_byte( clamp(iRed, 0, 255) ); // red
write_byte( clamp(iGreen, 0, 255) ); // green
write_byte( clamp(iBlue, 0, 255) ); // blue
}
message_end();
}
__________________