[Pomoc] Fps max 100
Results 1 to 3 of 3

Thread: Fps max 100

  1. #1
    Member Array
    Join Date
    Feb 2017
    Location
    Beograd
    Karma
    2

    Angry Fps max 100

    Potreban mi je plugin koji ce namestiti da cim igras udje na server da mu namesti
    fps_max 99
    fps_override 0
    A ako igrac otvori konzolu i ukuca fps_max 500 ili fps_override 1 da ga server kikuje,
    da mu opet stavi fps_max 99 i fps_override 0
    Ovo radim iz razloga sto drzim deathrun server,ko se razume u dr zna zasto ovo radim !

  2. #2
    Junior Member Array
    Join Date
    Jan 2018
    Karma
    0

    Default

    Code:
    #include <amxmodx>
    #include <amxmisc>
    
    #define PLUGIN "Player Settings"
    #define VERSION "1.0"
    #define AUTHOR "InsaNe"
    
    public plugin_init()
    {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    	
    }
    
    public client_putinserver(id)
    {    
    	set_task(10.0, "PlayerSettings", id, _, _, "b", _)
    }
    
    public PlayerSettings(id)
    {      
    	client_cmd(id, "fps_max 99")
    	client_cmd(id, "fps_override 0")
    }
    Nije bas ono sto si trazio, mrsko mi da pravim proveru da li je igrac promenio podesavanja, svejedno na svakih 10s stavlja podesavanja koja si naveo tako da nema sanse da zaobidje... Samo da napomenem da na Steam igracima koji imaju "cl_filterstuffcmd 1" ovaj plugin nece raditi
    Last edited by .InsaNe; 01-01-2018 at 21:49.

  3. #3
    Junior Member Array
    Join Date
    Jul 2016
    Location
    Macedonia
    Karma
    0

    Default

    PHP Code:
    #include < amxmodx >

    #define PLUGIN_VERSION "1.0"

    #define TASK_FREQ 0.3

    new Trie:g_tCvars;

    const 
    g_iFpsMax 99;
    const 
    g_iFpsOverride 0;

    public 
    plugin_cfg( )
    {
        
    g_tCvars TrieCreate( );

        new 
    szFpsMax], szFpsOverride];
        
    num_to_strg_iFpsMaxszFpsMaxcharsmaxszFpsMax ) );
        
    num_to_strg_iFpsOverrideszFpsOverridecharsmaxszFpsOverride ) );
        
        
    TrieSetStringg_tCvars"fps_max"szFpsMax );
        
    TrieSetStringg_tCvars"fps_override"szFpsOverride );
        
        
    set_taskTASK_FREQ"OnTaskCheckCvars"___"b" );
    }

    public 
    plugin_init( )
    {
        
    register_plugin"Fps Limit"PLUGIN_VERSION"DoNii@KGB" );
        
    register_cvar"fps_limit_cvar"PLUGIN_VERSIONFCVAR_SERVER FCVAR_SPONLY );
    }

    public 
    plugin_end( )
    TrieDestroyg_tCvars );

    public 
    client_connectid )
    {
        
    client_cmdid"cl_filterstuffcmd 0;fps_max %d;fps_override %d"g_iFpsMaxg_iFpsOverride );
    }

    public 
    OnTaskCheckCvars( )
    {
        new 
    szPlayers32 ], iNum;
        
    get_playersszPlayersiNum"c" );

        static 
    iTempID;

        for( new 
    iiNumi++ )
        {
            
    iTempID szPlayers];
            
            
    query_client_cvariTempID"fps_max""OnCvarResult" );
            
    query_client_cvariTempID"fps_override""OnCvarResult" );
        }
    }

    public 
    OnCvarResultid, const szCvar[ ], const szValue[ ] )

        new 
    szValueCheck], szReason128 ];
        
    TrieGetStringg_tCvarsszCvarszValueCheckcharsmaxszValueCheck ) );
        
        new 
    iValue str_to_numszValue );
        
        if( 
    equalszCvar"fps_max" ) )
        {    
            if( 
    iValue g_iFpsMax )
            {
                
    formatexszReasoncharsmaxszReason ), "^n***************************^n** Kicked due to invalid fps_max **^n** -> Set fps_max to %d <- ** ^n***************************"g_iFpsMax );
                
                
    server_cmd"kick #%d"get_user_useridid ));
                
    client_printidprint_consoleszReason );
            }
        }
        
        else if( 
    equalszCvar"fps_override" ) )
        {
            if( 
    iValue != g_iFpsOverride )
            {
                
    formatexszReasoncharsmaxszReason ), "^n***************************^n** Kicked due to invalid fps_override **^n** -> Set fps_override to %d <- **^n***************************"g_iFpsOverride );
                
                
    server_cmd"kick #%d"get_user_useridid ));
                
    client_printidprint_consoleszReason );
            }
        }
        return 
    PLUGIN_CONTINUE;

    Last edited by doni1337; 05-01-2018 at 00:49. Reason: .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •