AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   check client fps_max number (https://forums.alliedmods.net/showthread.php?t=173102)

RuRuRu612754 11-30-2011 06:43

check client fps_max number
 
The client "fps_max" If the numbers below 100
or
The client "fps_max" If the numbers above 100
To perform the following steps, what should I do?

Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("PLUGIN", "VERSION", "AUTHOR")
}

public client_connect(id)
{
        if
        {
                client_kick(id)
        }
}

public client_kick(id)
{
        client_cmd(id, "disconnect")
}


Flipper_SPb 11-30-2011 06:46

Re: check client fps_max number
 
Use query_client_cvar() to get fps_max value
http://www.amxmodx.org/funcwiki.php?...ry_client_cvar

RuRuRu612754 11-30-2011 07:01

Re: check client fps_max number
 
Flipper_SPb

How to get the values ​​found
But

The client "fps_max" If the numbers below 100
or
The client "fps_max" If the numbers above 100
To perform the following steps, what should I do?

sorry

MyPc 11-30-2011 07:32

Re: check client fps_max number
 
Quote:

Originally Posted by RuRuRu612754 (Post 1605150)
Flipper_SPb

How to get the values ​​found
But

The client "fps_max" If the numbers below 100
or
The client "fps_max" If the numbers above 100
To perform the following steps, what should I do?

sorry

Read This : http://www.amxmodx.org/funcwiki.php?go=func&id=854

And if you didn't understand :
PHP Code:

#include < amxmodx >

public client_connectid )
{
    
query_client_cvarid"fps_max""result" );
}

public 
resultid, const cvar[ ], const value[ ] )
{
    new 
iValue str_to_numvalue );
    
    if( 
iValue 100 )
    {
        
// Fps Bigger Then 100
    
}else if( iValue 100 ){
        
// Fps Lower Then 100
    
}
}
public 
client_kick(id)
{
    
client_cmdid"disconnect" );



RuRuRu612754 11-30-2011 07:38

Re: check client fps_max number
 
MyPc
thanks

and

Flipper_SPb
thanks

Isaac999 11-30-2011 07:39

Re: check client fps_max number
 
Quote:

Originally Posted by Flipper_SPb (Post 1605143)
Use query_client_cvar() to get fps_max value
http://www.amxmodx.org/funcwiki.php?...ry_client_cvar

Thanks i need too


All times are GMT -4. The time now is 08:28.

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