Raised This Month: $319 Target: $400
 79%   Almost there!

[ANY?] Timescale Windows Fix

Post New Thread Reply   
Thread Tools Display Modes
Join Date: Nov 2012
Plugin ID:
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Fixes host_timescale without sv_cheats on Windows servers
    Old 05-10-2020 , 19:09   [ANY?] Timescale Windows Fix
    Reply With Quote #1

    This plugin allows host_timescale changes to work on Windows servers without having to turn on sv_cheats. This has always worked fine on Linux servers, but there is some extra engine code that only exists on Windows for some reason that prevents the value from being applied if cheats are disabled.

    Keep in mind that you will still need to set a fake sv_cheats 1 value on the client using SendConVarValue for timescale to work without desync issues. This will not allow the client to use server-side cheat commands like noclip, but they will be able to use clientside cheats such as mat_wireframe. These clientside cheats will automatically disable themselves if you set the fake sv_cheats value back to 0.

    An example of an existing plugin that benefits from this fix is Freak Fortress 2. Ninja Spy's slowmo rage normally does not work properly on Windows servers, but with this, it will.

    This has only been tested in TF2, but in theory it should work for other games with the same/similar engine.

    • Put timescale_win_fix.smx in the plugins folder
    • Put timescale_win_fix.txt in the gamedata folder
    Attached Files
    File Type: sp Get Plugin or Get Source (timescale_win_fix.sp - 437 views - 1.2 KB)
    File Type: smx timescale_win_fix.smx (3.0 KB, 191 views)
    File Type: txt timescale_win_fix.txt (274 Bytes, 294 views)

    Last edited by bakugo; 05-10-2020 at 19:28.
    bakugo is offline
    Junior Member
    Join Date: May 2018
    Old 05-14-2020 , 04:19   Re: [ANY?] Timescale Windows Fix
    Reply With Quote #2

    Nice work. Thanks for the fix!

    Last edited by XGAK; 05-14-2020 at 04:23.
    XGAK is offline
    Senior Member
    Join Date: Oct 2014
    Location: Argentina
    Old 01-24-2021 , 16:32   Re: [ANY?] Timescale Windows Fix
    Reply With Quote #3

    Seem not working on L4D1.

    Where are the instructions??
    I installed your plugin+gamedata,
    restarted my server,
    sm_cvar host_timescale 2.0

    And nothing happened.
    (Windows 10, L4D1 Dedicated Server)

    Last edited by axelnieves2012; 01-24-2021 at 16:33.
    axelnieves2012 is offline
    Senior Member
    Join Date: Oct 2014
    Location: Argentina
    Old 01-24-2021 , 17:00   Re: [ANY?] Timescale Windows Fix
    Reply With Quote #4

    SOLVED. I had to make an extra plugin but it works now.
    Here is the source if anyone needs it.
    Works pretty fine on L4D1 now.
    Nice work.
    Maybe I would have to check if client disables sv_cheats on his console.
    I wonder whats happens if one client overrides "sv_cheats 1" while other clients are in "slow camera" (host_timescale 0.5).

    PHP Code:
    #include <sourcemod>
    #pragma semicolon 1
    #pragma newdecls required

    #define PLUGIN_VERSION "1.0"

    public Plugin myinfo =
    name "Host Time Scale",
    author "Axel Juan Nieves",
    description "",
    version PLUGIN_VERSION,
    url ""

    ConVar host_timescalesv_cheats;

    void OnPluginStart()
    host_timescale FindConVar("host_timescale");
    sv_cheats FindConVar("sv_cheats");

    void OnClientPutInServer(int client)
        if ( 
    IsFakeClient(client) )
        if ( 
    GetConVarFloat(host_timescale)!=1.0 )

    void OnClientDisconnect(int client)
        if ( 
    IsFakeClient(client) )

    void TimescaleChange(Handle convar, const char[] oldValue, const char[] newValue)
        for (
    int client=1client<=MaxClientsclient++)
            if ( 
    IsFakeClient(client) )
            if ( 
    GetConVarFloat(host_timescale)!=1.0 )

    Attached Files
    File Type: smx host_timescale.smx (3.1 KB, 25 views)
    File Type: sp Get Plugin or Get Source (host_timescale.sp - 113 views - 1.2 KB)

    Last edited by axelnieves2012; 01-24-2021 at 17:05.
    axelnieves2012 is offline

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump

    All times are GMT -4. The time now is 09:38.

    Powered by vBulletin®
    Copyright ©2000 - 2021, vBulletin Solutions, Inc.
    Theme made by Freecode