updated to use amx_show_activity in hud messages

This commit is contained in:
Lukasz Wlasinksi 2004-09-27 17:43:40 +00:00
parent c2a2fc7dbe
commit 4fcad51d25

View File

@ -35,10 +35,6 @@
#include <amxmodx> #include <amxmodx>
#include <amxmisc> #include <amxmisc>
// Uncomment if you want to display
// names with hud messages
//#define SHOW_NAMES
new g_msgChannel new g_msgChannel
#define MAX_CLR 10 #define MAX_CLR 10
@ -91,13 +87,14 @@ public cmdSayChat(id) {
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2],
g_Pos[i][0], verpos , 0, 6.0, 6.0, 0.5, 0.15, g_msgChannel ) g_Pos[i][0], verpos , 0, 6.0, 6.0, 0.5, 0.15, g_msgChannel )
#if defined SHOW_NAMES if ( get_cvar_num("amx_show_activity") == 2 ){
show_hudmessage(0,"%s : %s",name,message[i+1]) show_hudmessage(0,"%s : %s",name,message[i+1])
client_print(0,print_notify,"%s : %s",name,message[i+1]) client_print(0,print_notify,"%s : %s",name,message[i+1])
#else }
show_hudmessage(0,message[i+1]) else{
client_print(0,print_notify,message[i+1]) show_hudmessage(0,message[i+1])
#endif client_print(0,print_notify,message[i+1])
}
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }
@ -227,16 +224,16 @@ public cmdTsay(id,level,cid) {
userid = get_user_userid(id) userid = get_user_userid(id)
set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, g_msgChannel) set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, g_msgChannel)
#if defined SHOW_NAMES if ( get_cvar_num("amx_show_activity") == 2 ){
show_hudmessage(0,"%s : %s",name,message[length]) show_hudmessage(0,"%s : %s",name,message[length])
client_print(0,print_notify,"%s : %s",name,message[length]) client_print(0,print_notify,"%s : %s",name,message[length])
console_print(id,"%s : %s",name,message[length]) console_print(id,"%s : %s",name,message[length])
#else }
show_hudmessage(0,message[length]) else{
client_print(0,print_notify,message[length]) show_hudmessage(0,message[length])
console_print(id,message[length]) client_print(0,print_notify,message[length])
#endif console_print(id,message[length])
}
log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"",name,userid,authid,cmd[4],message[length]) log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"",name,userid,authid,cmd[4],message[length])
log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")",