Quote:
Originally Posted by OciXCrom
Is there a difference? I believe it's much faster for you to create the file yourself rather than to wait for someone else to do the same thing in a 13 years old thread.
Adding a line also includes adding a comma in the list.
Can you tell me what is the reason of forcing this cvar to players?
sv_timeout exists and it takes priority over the players' settings.
|
OciCXrom, I did make my own SMA, my version is below.
I don't know HOW to make a SMA file. All I seem to be able to do is make a txt file. Do I rename a txt as .sma and just becomes an SMA file? Tried that, and it didn't work. So, I used an existing SMA, and changed all of the text in it, then resaved it with a different name with the existing SMA file extension.
Sorry the thread is 13 years old, but my server is only 1 month old, so I'm looking for answers now, not 13 years ago.
I want to use this MAINLY to adjust their video settings for them. About 50% of my player base have no idea how to optimize their video settings, and the other half can't even find the "~" key on their keyboard.
Players are saying "the map is too dark", and I work with them only to find out their gamma is set to 1, and their brightness is all the way down.
I really don't feel like troubleshooting peoples videos settings so this is a plugin that I can use to force settings on the players to avoid having to spend time with ALL of them individually.
I have 728 players across 45 countries and I simply don't speak all of the languages needed to be able to help them fix something so simple.
The other reason is: I had received the SVC_BAD & AY&SY error on Monday and I spent all day reading up on fixes for it. Every thread comes back to this one. Nobody seemed to argue with the solution offered here when it was provided.
I have 192 Gb of RAM on my server. I carved out the recommended -zone 8192 in the CMD startup, but this plugin appears to be the OTHER half that may reduce the likelyhood of the problem from repeating.
https://forums.alliedmods.net/showth...t=67028&page=5
Is there a way to make this plugin so that it pops up only ONCE upon joining the server instead of having to click the OK button at EVERY map change?
Code:
#include <amxmodx>
#define POPUP_DELAY 5.0
new ChangedSettings[][] =
{
"fps_max 101",
"developer 0",
"cl_timeout 60",
"gamma 3",
"brightness 2"
};
new Title[128] = "THE BELOW SETTINGS WILL BE APPLIED TO YOUR CONFIG WHILE IN THIS SERVER:";
new Yes[] = "I AGREE (required to play)";
new No[] = "NO (you will be kicked)";
new KickReason[] = "You were kicked for non-compliance.";
public plugin_init()
{
register_plugin("Settings Pop-Up", "1.1", "hleV");
for (new Num = 0; Num < sizeof(ChangedSettings); Num++)
format(Title, 127, "%s^n%s", Title, ChangedSettings[Num]);
}
public client_putinserver(Cl)
set_task(POPUP_DELAY, "ShowMenu", Cl);
public ShowMenu(Cl)
{
new Menu = menu_create(Title, "MenuChoice");
menu_additem(Menu, Yes);
menu_additem(Menu, No);
menu_setprop(Menu, MPROP_PERPAGE, 0);
menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER);
menu_display(Cl, Menu, 0);
}
public MenuChoice(Cl, Menu, Item)
{
switch (++Item)
{
case 1:
for (new Num = 0; Num < sizeof(ChangedSettings); Num++)
client_cmd(Cl, ChangedSettings[Num]);
case 2:
server_cmd("kick #%d ^"%s^"", get_user_userid(Cl), KickReason);
}
menu_destroy(Menu);
}