Raised This Month: $32 Target: $400
 8% 

Player fps limitation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rhyme
Member
Join Date: Aug 2010
Location: Russia (Moscow)
Old 01-16-2018 , 04:37   Player fps limitation
Reply With Quote #1

Hello guys. How do I make sure that the players on my server have the maximum permissible FPS - 101.
I do not need ready big plugins like: fps checker, cvar checker etc. Not needed warnings and then kick, not needed check fps_ovveride and developer,
Need a minimum load on the server and a simple check - if player fps > 101, set player fps 101

Last edited by Rhyme; 01-16-2018 at 04:37.
Rhyme is offline
Send a message via ICQ to Rhyme Send a message via Skype™ to Rhyme
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-16-2018 , 05:11   Re: Player fps limitation
Reply With Quote #2

you can try this:

https://forums.alliedmods.net/showthread.php?t=170020
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Rhyme
Member
Join Date: Aug 2010
Location: Russia (Moscow)
Old 01-16-2018 , 06:49   Re: Player fps limitation
Reply With Quote #3

Quote:
Originally Posted by raizo11 View Post
Please read again my post)
Especially your is check only client_connect and player spawn, but i need check as often as possible but at the same time minimum load on the server - if you can so express yourself to find a balance between this

Last edited by Rhyme; 01-16-2018 at 06:49.
Rhyme is offline
Send a message via ICQ to Rhyme Send a message via Skype™ to Rhyme
Rhyme
Member
Join Date: Aug 2010
Location: Russia (Moscow)
Old 01-17-2018 , 04:27   Re: Player fps limitation
Reply With Quote #4

up
Rhyme is offline
Send a message via ICQ to Rhyme Send a message via Skype™ to Rhyme
killerZM
Senior Member
Join Date: Sep 2016
Old 01-17-2018 , 06:53   Re: Player fps limitation
Reply With Quote #5

i will tell you what i know but it might be wrong
u can't do this
it depends on the player pc and performance
all u can do is set fps_max to 101
killerZM is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2018 , 09:02   Re: Player fps limitation
Reply With Quote #6

I wrote this for someone who wanted to kick players who had different CVAR values than the allowed ones, maybe you'll find something helpful.
PHP Code:
#include < amxmodx >

#define PLUGIN_VERSION "1.0"

#define TASK_FREQ 0.8

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" );
    
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 edon1337; 01-18-2018 at 05:58.
edon1337 is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-17-2018 , 09:30   Re: Player fps limitation
Reply With Quote #7

Quote:
Originally Posted by Rhyme View Post
Not needed warnings and then kick, not needed check fps_ovveride and developer,
Need a minimum load on the server and a simple check - if player fps > 101, set player fps 101
Don`t understand you ! You want to change player fps ?

what is this?

if player fps > 101, set player fps 101

Last edited by raizo11; 01-17-2018 at 09:31.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 01-17-2018 , 13:58   Re: Player fps limitation
Reply With Quote #8

cl_filterstuffcmd is blocked budd'. No way getting through it.
__________________
Relaxing is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-17-2018 , 14:10   Re: Player fps limitation
Reply With Quote #9

Quote:
Originally Posted by Relaxing View Post
cl_filterstuffcmd is blocked budd'. No way getting through it.
I know, but it doesn't matter, that plugin still does what it is supposed to.
__________________
edon1337 is offline
Old 01-17-2018, 14:43
raizo11
This message has been deleted by raizo11.
Rhyme
Member
Join Date: Aug 2010
Location: Russia (Moscow)
Old 01-17-2018 , 18:41   Re: Player fps limitation
Reply With Quote #10

Quote:
Originally Posted by edon1337 View Post
I wrote this for someone who wanted to kick player's who had different CVAR values than the allowed ones, maybe you'll find something helpful.
PHP Code:
#include < amxmodx >

#define PLUGIN_VERSION "1.0"

#define TASK_FREQ 0.8

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

It will help, thank you very much. Tell me how often there is a check if the player is already on the server and passed the connect test?
I understand correctly, freq 0.8 this is how often the check goes? plugin cfg how often is it called then?

Last edited by Rhyme; 01-17-2018 at 18:51.
Rhyme is offline
Send a message via ICQ to Rhyme Send a message via Skype™ to Rhyme
Reply


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 05:40.


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