Page 1 of 1
an old question- [cl_minmodels 1]
Posted: Sat May 05, 2007 9:36 am
by vable
How can i kick the client if their cl_minmodels is not "0"
in war3ft.cfg , i add
Code: Select all
FT_query_client 0// Check user's cl_minmodel cvar every second (default is 1)
but I still can't fix this problem
did i miss something??
and after kicked the client can i show a message like "please change cl_minmodels 0 in this server"
i have searched other solutions here but honestly i don't really understand how to do that
I need your help please
thanks for answering my question and forgive my poor English
--- Please enter the following information for support ---
War3ft Version: 2.3.2
Amxmodx Version: 1.76c
Metamod Version: 1.19
amxx list:
amxx modules:
meta list:
Posted: Sat May 05, 2007 10:05 am
by Geesu
You have to use 3.0 for this to work
Posted: Sun May 06, 2007 12:17 am
by vable
Okey!! I will upgrade it in June
thanks for your answer
So the problem can't be fixed in 2.3.2 ,right??
Posted: Sun May 06, 2007 1:47 pm
by Krazy
Fixed May 7, 2007 works now without errors
Make a backup of the files before start changing code, so if this doesnt work you can go back to that. I dont have a server anymore to test it, so i am like 99% sure it will work. This is just the code taken off of the 3.0 version and applied to the 2.3.2 version. Let me know how it goes.
Open the amxmodx/scripting/war3ft/cstrike.inl
Change this:
Code: Select all
public WAR3_Mole_Fix(){
if ( iCvar[FT_QUERY_CLIENT] )
{
new players[32], num
get_players(players, num, "c")
for(new i = 0; i < num; i++)
{
if ( !is_user_bot( players[i] ) )
{
query_client_cvar(players[i], "cl_minmodels", "check_cvars");
}
}
set_task(1.0, "WAR3_Mole_Fix", TASK_MOLEFIX)
}
}
public check_cvars(id, const cvar[], const value[])
{
if( equali(cvar,"cl_minmodels") && str_to_num(value) > 0 )
{
//client_cmd(id, "cl_minmodels 0");
client_cmd(id, "echo ^"======== Warcraft 3 Frozen Throne ========^"");
client_cmd(id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"");
client_cmd(id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"");
client_cmd(id, "echo ^"=========================================^"");
server_cmd("kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid(id));
}
}
to
Code: Select all
public _CS_MinModelsLoop()
{
if ( !warcraft3 )
{
return;
}
new iPlayers[32], iNumPlayers, i;
get_players( iPlayers, iNumPlayers, "c" );
for ( i = 0; i < iNumPlayers; i++ )
{
query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
}
}
public _CS_CheckMinModelsValue( id, const cvar[], const value[] )
{
if ( equali( cvar, "cl_minmodels" ) && str_to_num( value ) > 0 )
{
client_cmd( id, "echo ^"======== Warcraft 3 Frozen Throne ========^"" );
client_cmd( id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"" );
client_cmd( id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"" );
client_cmd( id, "echo ^"=========================================^"" );
server_cmd( "kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid( id ) );
}
}
Open the amxmodx/scripting/warcraft3FT.sma
Change this:
Code: Select all
set_task(1.0, "WAR3_Mole_Fix", TASK_MOLEFIX)
to
Code: Select all
set_task( 1.0, "_CS_MinModelsLoop", TASK_MOLEFIX, "", 0, "b" );
Then recompile.
Posted: Sun May 06, 2007 7:33 pm
by vable
I am so appreciate for this solution
But I expect to upgrade my server to 3.0 in June
And I have found a plugin to fix this problem for me
I still thank you all a lot for helping me
By the way!! There is a small question for me
I set a few new and special skins for players in my serve
but when the player moles who has the special skin he will still wear that special skin I set up for him
Examplel:
T wear a special skin
he mole to ct with that special skin
and he was found out by CTs right away
----------------------------------------------
So in that case
can I change that by altering the code to prevent wear the special skin when mole??
or somethings i can do
Final dear Geesu and Krazy thank for your help again
Posted: Sun May 06, 2007 8:37 pm
by DesasterUK
the plugin u are running is forcing that special skin for the players so wc3ft can't override it
had the same problem some weeks ago, cause i wanted the admins to pick some special skins
the only way to fix it, is to re-code the skin-plugin to check if the player is mole, i think.
Posted: Sun May 06, 2007 9:48 pm
by MeowJohn
Krazy wrote:Make a backup of the files before start changing code, so if this doesnt work you can go back to that. I dont have a server anymore to test it, so i am like 99% sure it will work. This is just the code taken off of the 3.0 version and applied to the 2.3.2 version. Let me know how it goes.
Open the amxmodx/scripting/war3ft/cstrike.inl
Change this:
Code: Select all
public WAR3_Mole_Fix(){
if ( iCvar[FT_QUERY_CLIENT] )
{
new players[32], num
get_players(players, num, "c")
for(new i = 0; i < num; i++)
{
if ( !is_user_bot( players[i] ) )
{
query_client_cvar(players[i], "cl_minmodels", "check_cvars");
}
}
set_task(1.0, "WAR3_Mole_Fix", TASK_MOLEFIX)
}
}
public check_cvars(id, const cvar[], const value[])
{
if( equali(cvar,"cl_minmodels") && str_to_num(value) > 0 )
{
//client_cmd(id, "cl_minmodels 0");
client_cmd(id, "echo ^"======== Warcraft 3 Frozen Throne ========^"");
client_cmd(id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"");
client_cmd(id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"");
client_cmd(id, "echo ^"=========================================^"");
server_cmd("kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid(id));
}
}
to
Code: Select all
public _CS_MinModelsLoop()
{
if ( !warcraft3 )
{
return;
}
new iPlayers[32], iNumPlayers, i;
get_players( iPlayers, iNumPlayers, "c" );
for ( i = 0; i < iNumPlayers; i++ )
{
query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
}
}
public _CS_CheckMinModelsValue( id, const cvar[], const value[] )
{
if ( equali( cvar, "cl_minmodels" ) && str_to_num( value ) > 0 )
{
client_cmd( id, "echo ^"======== Warcraft 3 Frozen Throne ========^"" );
client_cmd( id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"" );
client_cmd( id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"" );
client_cmd( id, "echo ^"=========================================^"" );
server_cmd( "kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid( id ) );
}
}
Open the amxmodx/scripting/warcraft3FT.sma
Change this:
Code: Select all
set_task(1.0, "WAR3_Mole_Fix", TASK_MOLEFIX)
to
Code: Select all
set_task( 1.0, "_CS_MinModelsLoop", TASK_MOLEFIX, "", 0, "b" );
Then recompile.
hi~Krazy
compile error, can u fix it?
Posted: Mon May 07, 2007 7:52 am
by YamiKaitou
Code: Select all
public _CS_MinModelsLoop()
{
if ( !warcraft3 )
{
return;
}
new iPlayers[32], iNumPlayers, i;
get_players( iPlayers, iNumPlayers, "c" );
for ( i = 0; i < iNumPlayers; i++ )
{
query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
}
}
public _CS_CheckMinModelsValue( id, const cvar[], const value[] )
{
if ( equali( cvar, "cl_minmodels" ) && str_to_num( value ) > 0 )
{
client_cmd( id, "echo ^"======== Warcraft 3 Frozen Throne ========^"" );
client_cmd( id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"" );
client_cmd( id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"" );
client_cmd( id, "echo ^"=========================================^"" );
server_cmd( "kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid( id ) );
}
}
Posted: Mon May 07, 2007 9:09 am
by MeowJohn
YamiKaitou wrote:Code: Select all
public _CS_MinModelsLoop()
{
if ( !warcraft3 )
{
return;
}
new iPlayers[32], iNumPlayers, i;
get_players( iPlayers, iNumPlayers, "c" );
for ( i = 0; i < iNumPlayers; i++ )
{
query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
}
}
public _CS_CheckMinModelsValue( id, const cvar[], const value[] )
{
if ( equali( cvar, "cl_minmodels" ) && str_to_num( value ) > 0 )
{
client_cmd( id, "echo ^"======== Warcraft 3 Frozen Throne ========^"" );
client_cmd( id, "echo ^"You were kicked because cl_minmodels is set to 1 on your client, please change this to 0.^"" );
client_cmd( id, "echo ^"Type ^"cl_minmodels 0^" in your console and press enter to do this.^"" );
client_cmd( id, "echo ^"=========================================^"" );
server_cmd( "kick #%d ^"cl_minmodels 1 is not allowed on this server^"", get_user_userid( id ) );
}
}
Thank for ur Help..compile OK,
& I chang some warcraft3ft.sma code, It work without any error log message
Code: Select all
query_client_cvar(id, "cl_minmodels", "check_cvars");
to
Code: Select all
query_client_cvar(id, "cl_minmodels", "_CS_CheckMinModelsValue");
Posted: Mon May 07, 2007 3:01 pm
by Krazy
MeowJohn wrote:hi~Krazy
compile error, can u fix it?
Yeah sorry about that I put the BBcode in "small" instead of "code" by accident. Fixed it above now.
MeowJohn wrote:Thank for ur Help..compile OK,
& I chang some warcraft3ft.sma code, It work without any error log message
Code: Select all
query_client_cvar(id, "cl_minmodels", "check_cvars");
to
Code: Select all
query_client_cvar(id, "cl_minmodels", "_CS_CheckMinModelsValue");
If you changed the code above like it said it should be fine.
You just changed:
Code: Select all
query_client_cvar( iPlayers[i], "cl_minmodels", "_CS_CheckMinModelsValue" );
to
Code: Select all
query_client_cvar(id, "cl_minmodels", "_CS_CheckMinModelsValue");
which is basically the same thing.
Can someone comfirm if they code above works with changing what it says?
Posted: Tue May 08, 2007 7:03 pm
by MeowJohn
hi~Krazy
thank for Your help, it works two days & everything is fine, server logs is without any error record ^^..sorry for my poor english ><