yokomo wrote: sLiterok wrote: Maybe this plugin can help you, but it cant be usefull from very old builds of cs1.6 - #include <amxmodx>
-
- #define PLUGIN "Client Version"
- #define VERSION "1.0"
- #define AUTHOR "DJ_WEST"
-
- #define KICK_REASON "Please update you game client!"
- #define CLIENT_VERSION "sv_version"
- #define PATCHES 9
-
- new g_MinVersion
-
- enum DATA
- {
- CL_VERSION,
- CL_PATCH
- }
-
- new const g_Version[PATCHES][DATA][] =
- {
- { "1.1.2.5,47,3329", "27" },
- { "1.1.2.5,47,3382", "28" },
- { "1.1.2.5,47,3647", "29" },
- { "1.1.2.5,47,3647", "30" },
- { "1.1.2.5,47,3779", "31" },
- { "1.1.2.5/2.0.0.0,47,3939", "33" },
- { "1.1.2.5/2.0.0.0,47,4156", "34" },
- { "1.1.2.5/2.0.0.0,47,4156", "35" },
- { "1.1.2.6/2.0.0.0,47,4156", "36" }
- }
-
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
-
- g_MinVersion = register_cvar("amx_client_version", "40")
- }
-
- public client_putinserver(id)
- set_task(1.0, "Check_Version", id)
-
- public Check_Version(id)
- {
- if (is_user_bot(id))
- return PLUGIN_HANDLED
-
- query_client_cvar(id, CLIENT_VERSION, "Cvar_Result")
-
- return PLUGIN_HANDLED
- }
-
- public Cvar_Result(id, const s_Cvar[], const s_Value[])
- {
- if (equal(s_Cvar, CLIENT_VERSION) && s_Value[0])
- {
- new s_MinVersion[32], i_MinVersion
-
- get_pcvar_string(g_MinVersion, s_MinVersion, charsmax(s_MinVersion))
- i_MinVersion = str_to_num(s_MinVersion)
-
- for (new i = 0; i < PATCHES; i++)
- if (equal(g_Version[i][CL_VERSION], s_Value))
- {
- new i_Patch, i_UserID
-
- i_Patch = str_to_num(g_Version[i][CL_PATCH])
- i_UserID = get_user_userid(id)
-
- if (i_Patch < i_MinVersion)
- server_cmd("kick #%d %s", i_UserID, KICK_REASON)
- }
- }
- }
-
yeah an amxx plugin, this is what i'm waiting for. i will add more old client from p47 for this plugin.. will test it, thanks dude, are you the author of this plugin? I'm not, DJ_WEST is the author.
- g_MinVersion = register_cvar("amx_client_version", "40")
amx_client_version this is the minimal version from which you can play
And you also should add here the minimal version of p48 (i'm not sure, but it may be 40 patch and i dont know his sv_version
- new const g_Version[PATCHES][DATA][] =
- {
- { "1.1.2.5,47,3329", "27" },
- { "1.1.2.5,47,3382", "28" },
- { "1.1.2.5,47,3647", "29" },
- { "1.1.2.5,47,3647", "30" },
- { "1.1.2.5,47,3779", "31" },
- { "1.1.2.5/2.0.0.0,47,3939", "33" },
- { "1.1.2.5/2.0.0.0,47,4156", "34" },
- { "1.1.2.5/2.0.0.0,47,4156", "35" },
- { "1.1.2.6/2.0.0.0,47,4156", "36" }
- }
|