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.