Update amxx.cfg for all games

This commit is contained in:
OciXCrom 2018-09-12 16:25:51 +02:00
parent 4846a350cb
commit 42adcc7700
4 changed files with 77 additions and 16 deletions

View File

@ -37,18 +37,38 @@ amx_show_activity 2
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600 // 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 amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Center typed colored messages (last parameter is a color in RRRGGGBBB format) // Center typed colored info messages (last parameter is a color in RRRGGGBBB format)
// //
// Default values: "Welcome to %hostname%" "000255100" // Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255" // "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100" 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\nVisit http://www.amxmodx.org" "000100255"
// Frequency in seconds of colored messages // Frequency in seconds of info messages
// //
// Default value: 180 // Default value: 180
amx_freq_imessage 180 amx_freq_imessage 180
// X position on the screen for info messages
//
// Default value: -1.0
amx_imessage_x_pos -1.0
// Y position on the screen for info messages
//
// Default value: 0.2
amx_imessage_y_pos 0.2
// Hold time for info messages
//
// Default value: 12.0
amx_imessage_x_pos 12.0
// Set to 1 if you want to show info messages only to dead clients
//
// Default value: 0
amx_imessage_only_dead 0
// Ban times for the main ban menu (amx_banmenu) // Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban. // Use 0 for permanent ban.
// Default values: 0 5 10 15 30 45 60 // Default values: 0 5 10 15 30 45 60

View File

@ -37,18 +37,38 @@ amx_show_activity 2
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600 // 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 amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Center typed colored messages (last parameter is a color in RRRGGGBBB format) // Center typed colored info messages (last parameter is a color in RRRGGGBBB format)
// //
// Default values: "Welcome to %hostname%" "000255100" // Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255" // "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100" 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\nVisit http://www.amxmodx.org" "000100255"
// Frequency in seconds of colored messages // Frequency in seconds of info messages
// //
// Default value: 180 // Default value: 180
amx_freq_imessage 180 amx_freq_imessage 180
// X position on the screen for info messages
//
// Default value: -1.0
amx_imessage_x_pos -1.0
// Y position on the screen for info messages
//
// Default value: 0.2
amx_imessage_y_pos 0.2
// Hold time for info messages
//
// Default value: 12.0
amx_imessage_x_pos 12.0
// Set to 1 if you want to show info messages only to dead clients
//
// Default value: 0
amx_imessage_only_dead 0
// Ban times for the main ban menu (amx_banmenu) // Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban // Use 0 for permanent ban
// Default values: 0 5 10 15 30 45 60 // Default values: 0 5 10 15 30 45 60

View File

@ -37,18 +37,38 @@ amx_show_activity 2
// Default value: "Welcome to %hostname% -- This server is using AMX Mod X" 600 // 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 amx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600
// Center typed colored messages (last parameter is a color in RRRGGGBBB format) // Center typed colored info messages (last parameter is a color in RRRGGGBBB format)
// //
// Default values: "Welcome to %hostname%" "000255100" // Default values: "Welcome to %hostname%" "000255100"
// "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255" // "This server is using AMX ModX\nVisit http://www.amxmodx.org" "000100255"
amx_imessage "Welcome to %hostname%" "000255100" 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\nVisit http://www.amxmodx.org" "000100255"
// Frequency in seconds of colored messages // Frequency in seconds of info messages
// //
// Default value: 180 // Default value: 180
amx_freq_imessage 180 amx_freq_imessage 180
// X position on the screen for info messages
//
// Default value: -1.0
amx_imessage_x_pos -1.0
// Y position on the screen for info messages
//
// Default value: 0.2
amx_imessage_y_pos 0.2
// Hold time for info messages
//
// Default value: 12.0
amx_imessage_x_pos 12.0
// Set to 1 if you want to show info messages only to dead clients
//
// Default value: 0
amx_imessage_only_dead 0
// Ban times for the main ban menu (amx_banmenu) // Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban. // Use 0 for permanent ban.
// Default values: 0 5 10 15 30 45 60 // Default values: 0 5 10 15 30 45 60

View File

@ -25,7 +25,6 @@ enum _:MessageInfo
B B
} }
new Array:g_messages; new Array:g_messages;
new g_messagesNum; new g_messagesNum;
new g_hudObject; new g_hudObject;
@ -49,10 +48,10 @@ public plugin_init()
g_messages = ArrayCreate(MessageInfo); g_messages = ArrayCreate(MessageInfo);
g_hudObject = CreateHudSyncObj(); g_hudObject = CreateHudSyncObj();
bind_pcvar_num(create_cvar("amx_imessage_only_dead", "0", _, "Set to 1 if to show info messages only to dead clients", true, 0.0, true, 1.0), g_amx_imessage_only_dead); bind_pcvar_num(create_cvar("amx_imessage_only_dead", "0", _, "Set to 1 to show info messages only to dead clients", true, 0.0, true, 1.0), g_amx_imessage_only_dead);
bind_pcvar_float(create_cvar("amx_freq_imessage", "180", _, "Frequency in seconds of info messages", true, 0.0), g_amx_freq_imessage); bind_pcvar_float(create_cvar("amx_freq_imessage", "180", _, "Frequency in seconds of info messages", true, 0.0), g_amx_freq_imessage);
bind_pcvar_float(create_cvar("amx_imessage_x_pos", "-1.0", _, "X position for info messages", true, -1.0, true, 1.0), g_amx_imessage_x_pos); bind_pcvar_float(create_cvar("amx_imessage_x_pos", "-1.0", _, "X position for info messages", true, -1.0, true, 1.0), g_amx_imessage_x_pos);
bind_pcvar_float(create_cvar("amx_imessage_y_pos", "0.20", _, "Y position for info messages", true, -1.0, true, 1.0), g_amx_imessage_y_pos); bind_pcvar_float(create_cvar("amx_imessage_y_pos", "0.2", _, "Y position for info messages", true, -1.0, true, 1.0), g_amx_imessage_y_pos);
bind_pcvar_float(create_cvar("amx_imessage_holdtime", "12.0", _, "Hold time for info messages", true, -1.0, true, 1.0), g_amx_imessage_holdtime); bind_pcvar_float(create_cvar("amx_imessage_holdtime", "12.0", _, "Hold time for info messages", true, -1.0, true, 1.0), g_amx_imessage_holdtime);
bind_pcvar_string(get_cvar_pointer("hostname"), g_hostname, charsmax(g_hostname)); bind_pcvar_string(get_cvar_pointer("hostname"), g_hostname, charsmax(g_hostname));
@ -64,18 +63,18 @@ public plugin_init()
public infoMessage() public infoMessage()
{ {
// No messages, just get out of here
if (!g_messagesNum)
{
return;
}
// If the last message is reached, go back to the first one // If the last message is reached, go back to the first one
if (g_current >= g_messagesNum) if (g_current >= g_messagesNum)
{ {
g_current = 0; g_current = 0;
} }
// No messages, just get out of here
if (g_messagesNum == 0)
{
return;
}
static message[MessageInfo]; static message[MessageInfo];
ArrayGetArray(g_messages, g_current, message); ArrayGetArray(g_messages, g_current, message);
replace_stringex(message[Message], charsmax(message[Message]), "%hostname%", g_hostname); replace_stringex(message[Message], charsmax(message[Message]), "%hostname%", g_hostname);
@ -133,7 +132,9 @@ public setMessage()
ArrayPushArray(g_messages, message); ArrayPushArray(g_messages, message);
if (g_amx_freq_imessage > 0.0) if (g_amx_freq_imessage > 0.0)
{
set_task(g_amx_freq_imessage, "infoMessage", TASK_MSG); set_task(g_amx_freq_imessage, "infoMessage", TASK_MSG);
}
return PLUGIN_HANDLED; return PLUGIN_HANDLED;
} }