For the steam id that is easy as I show you an example of how I do it below. But for your 2nd request I couldn't say intil I tried it on my private server.
This example pretty much finds out your steam id and than display's it in the chat window in green text, it also plays a sound clip "blip" so you can hear that something popped up on the chat window.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>
#define PLUGIN "Gather & Display Steam ID"
#define VERSION "1.0"
#define AUTHOR "Demigod90"
new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_clcmd("say /sid","display_sid",0)
register_clcmd("say_team /sid","display_sid",0)
g_iMsgSayText = get_user_msgid("SayText");
}
public plugin_precache()
{
precache_sound(g_szSoundFile);
}
public display_sid(id)
{
if(is_user_bot(id)) return PLUGIN_CONTINUE;
new szAuthID[33];
get_user_authid(id,szAuthID,32);
new szMessage[164];
format(szMessage, 163, "^x04Your Steam ID is: %s", szAuthID);
client_cmd(id, "spk %s", g_szSoundFile);
message_begin(MSG_ONE, g_iMsgSayText, {0,0,0}, id);
write_byte (id);
write_string(szMessage);
message_end ();
return PLUGIN_HANDLED;
}
__________________