Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow [i|scroll]message to include AMX Mod X vers. #565

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
8 changes: 4 additions & 4 deletions configs/amxx.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ amx_show_activity 2

// Frequency in seconds and text of scrolling message
//
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
//
// Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
// "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100"
amx_imessage "This server is using AMX Mod X\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"

// Frequency in seconds of colored messages
//
Expand Down
8 changes: 4 additions & 4 deletions configs/cstrike/amxx.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ amx_show_activity 2

// Frequency in seconds and text of scrolling message
//
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
//
// Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
// "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100"
amx_imessage "This server is using AMX Mod X\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"

// Frequency in seconds of colored messages
//
Expand Down
8 changes: 4 additions & 4 deletions configs/ns/amxx.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ amx_show_activity 2

// Frequency in seconds and text of scrolling message
//
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600
amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X %version%" 600

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)
//
// Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
// "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100"
amx_imessage "This server is using AMX Mod X\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "This server is using AMX Mod X %version%\nVisit http://www.amxmodx.org" "000100255"

// Frequency in seconds of colored messages
//
Expand Down
2 changes: 1 addition & 1 deletion plugins/imessage.sma
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public infoMessage()
ArrayGetArray(g_Values, g_Current, values);

new hostname[64];

get_cvar_string("hostname", hostname, charsmax(hostname));
replace(Message, charsmax(Message), "%version%", AMXX_VERSION_MAJOR + "." + AMXX_VERSION_MINOR);
replace(Message, charsmax(Message), "%hostname%", hostname);

set_hudmessage(values[0], values[1], values[2], X_POS, Y_POS, 0, 0.5, HOLD_TIME, 2.0, 2.0, -1);
Expand Down
2 changes: 1 addition & 1 deletion plugins/scrollmsg.sma
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public msgInit()
g_xPos = 0.65

new hostname[64]

get_cvar_string("hostname", hostname, charsmax(hostname))
replace(g_scrollMsg, charsmax(g_scrollMsg), "%version%", AMXX_VERSION_MAJOR + "." + AMXX_VERSION_MINOR)
replace(g_scrollMsg, charsmax(g_scrollMsg), "%hostname%", hostname)

g_Length = strlen(g_scrollMsg)
Expand Down