diff --git a/plugins/imessage.sma b/plugins/imessage.sma index d6ecba67..18724862 100755 --- a/plugins/imessage.sma +++ b/plugins/imessage.sma @@ -63,6 +63,11 @@ public infoMessage() { if (g_Current >= g_MessagesNum) g_Current = 0 + + new hostname[64] + + get_cvar_string("hostname", hostname, 63) + replace(g_Messages[g_Current], 380, "%hostname%", hostname) set_hudmessage(g_Values[g_Current][0], g_Values[g_Current][1], g_Values[g_Current][2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 2.0, 2.0, -1) show_hudmessage(0, "%s", g_Messages[g_Current]) @@ -86,11 +91,6 @@ public setMessage() remove_task(12345) read_argv(1, g_Messages[g_MessagesNum], 380) - new hostname[64] - - get_cvar_string("hostname", hostname, 63) - replace(g_Messages[g_MessagesNum], 380, "%hostname%", hostname) - while (replace(g_Messages[g_MessagesNum], 380, "\n", "^n")) {} new mycol[12] diff --git a/plugins/scrollmsg.sma b/plugins/scrollmsg.sma index e6fb3cfe..abf9c04b 100755 --- a/plugins/scrollmsg.sma +++ b/plugins/scrollmsg.sma @@ -84,6 +84,13 @@ public msgInit() g_startPos = 0 g_xPos = 0.65 + new hostname[64] + + get_cvar_string("hostname", hostname, 63) + replace(g_scrollMsg, SCROLLMSG_SIZE-1, "%hostname%", hostname) + + g_Length = strlen(g_scrollMsg) + set_task(SPEED, "showMsg", 123, "", 0, "a", g_Length + 48) client_print(0, print_console, "%s", g_scrollMsg) } @@ -93,10 +100,6 @@ public setMessage() remove_task(123) /* remove current messaging */ read_argv(1, g_scrollMsg, SCROLLMSG_SIZE-1) - new hostname[64] - - get_cvar_string("hostname", hostname, 63) - replace(g_scrollMsg, SCROLLMSG_SIZE-1, "%hostname%", hostname) g_Length = strlen(g_scrollMsg) new mytime[32]