an old question- [cl_minmodels 1]

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

vable
Peon
Posts: 3
Joined: Tue Apr 03, 2007 10:59 am
Location: Taipei Taiwan

an old question- [cl_minmodels 1]

Postby vable » Sat May 05, 2007 9:36 am

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:

User avatar
Geesu
<b>King of the world!</b>
Posts: 3158
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Postby Geesu » Sat May 05, 2007 10:05 am

You have to use 3.0 for this to work
No Support via PM

vable
Peon
Posts: 3
Joined: Tue Apr 03, 2007 10:59 am
Location: Taipei Taiwan

Postby vable » Sun May 06, 2007 12:17 am

Okey!! I will upgrade it in June
thanks for your answer
So the problem can't be fixed in 2.3.2 ,right??

User avatar
Krazy
Forum Administrator
Posts: 282
Joined: Wed Jul 06, 2005 9:40 am
Location: Dayton, Ohio
Contact:

Postby Krazy » Sun May 06, 2007 1:47 pm

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.
Last edited by Krazy on Tue May 08, 2007 7:28 pm, edited 3 times in total.
Website: www.djpsych.com
Image

Need help anything to do with Warcraft 3 Mod, installing other plugins, setting up mySQL, installing PsychoStats, or anything else just PM/email me!

vable
Peon
Posts: 3
Joined: Tue Apr 03, 2007 10:59 am
Location: Taipei Taiwan

Postby vable » Sun May 06, 2007 7:33 pm

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

DesasterUK
WC3Mods Donor
WC3Mods Donor
Posts: 223
Joined: Thu Mar 09, 2006 6:05 pm
Location: Germany
Contact:

Postby DesasterUK » Sun May 06, 2007 8:37 pm

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.
Image

MeowJohn
Peon
Posts: 5
Joined: Sun May 06, 2007 9:40 pm

Postby MeowJohn » Sun May 06, 2007 9:48 pm

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?
Attachments
1.gif
1.gif (14.18 KiB) Viewed 4126 times

User avatar
YamiKaitou
Forum Moderator
Forum Moderator
Posts: 1925
Joined: Wed Feb 01, 2006 4:33 pm
Contact:

Postby YamiKaitou » Mon May 07, 2007 7:52 am

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 ) );
     } 
}
Image

No support via PM or Email

MeowJohn
Peon
Posts: 5
Joined: Sun May 06, 2007 9:40 pm

Postby MeowJohn » Mon May 07, 2007 9:09 am

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");

User avatar
Krazy
Forum Administrator
Posts: 282
Joined: Wed Jul 06, 2005 9:40 am
Location: Dayton, Ohio
Contact:

Postby Krazy » Mon May 07, 2007 3:01 pm

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?
Website: www.djpsych.com

Image



Need help anything to do with Warcraft 3 Mod, installing other plugins, setting up mySQL, installing PsychoStats, or anything else just PM/email me!

MeowJohn
Peon
Posts: 5
Joined: Sun May 06, 2007 9:40 pm

Postby MeowJohn » Tue May 08, 2007 7:03 pm

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 ><
Attachments
cl_minimodels.gif
cl_minimodels.gif (10.61 KiB) Viewed 4083 times

terry123
Peon
Posts: 15
Joined: Thu Apr 24, 2014 1:53 am
Contact:

Re: an old question- [cl_minmodels 1]

Postby terry123 » Fri Aug 22, 2014 8:13 pm

the plugin u are running is forcing that special skin for the players so wc3ft can't override it.
www.rush4rs.com


Return to “Help/Support”

Who is online

Users browsing this forum: No registered users and 1 guest