I have done this in a my own personal version of psychosounds for AMX
Heres what I did..
in plugin_init
Code:
register_clcmd("say /sounds", "motd_sounds",0," - Shows Loaded Sound Triggers");
anywhere else
Code:
public motd_sounds(id) {
new message[1024], len;
new line[256];
#if !defined NO_STEAM
len += copy( message[len] , 1023 - len, "<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:#000000;margin-left:8px;margin-top:0px;}</style></head><body><pre>")
#endif
for (new i = 0; i < word_count; i++) {
format(line, 255, "%-30s ", words[i]);
if ( i + 1 < word_count ) {
i++;
add(line, 255, words[i]);
add(line, 255, " ");
}
len += copy( message[len], 1023 - len,line);
len += copy( message[len], 1023 - len,"^n");
}
#if !defined NO_STEAM
len += copy( message[len] , 1023 - len, "</pre></body></html>")
#endif
show_motd(id, message, "Sound Triggers")
}
__________________