View Single Post
Author Message
Meelo
Member
Join Date: Aug 2010
Old 04-03-2021 , 16:54   check prefix of fps_max or any other command
Reply With Quote #1

Hey like 2 months ago you helped me with the fps_max checking but now some players found another way to increase their fps using third-party programms/cheats which uses prefixes

So i use this code from: https://forums.alliedmods.net/showthread.php?t=330652
but also i need to check if player type in console any prefix like: xxxfps_max "value" ks12_fps_max "value" because as far i know the command always ends at fps_max so everything before it is a cheat command

PHP Code:
public fpsid , const cvar[] , const value[] )
{
    new 
iCount bool:bInvalid;
    new 
iLen strlenvalue );
    
    for ( new 
iLen i++ )
    {
        if ( 
value] == '.' )
        {
            if ( ++
iCount )
            {
                
bInvalid true;
                break;
            }
        }
    }
    
    if ( 
bInvalid || ( str_to_floatvalue ) > 99.5 ) )
{
    if ( 
bInvalid )
        
client_printid print_chat "* Please fix your fps_max value, %s is formatted incorrectly." value );
    else
        
client_printid print_chat "* Please lower your fps_max value less than or equal to 95.5" );
        
    
user_killid );    

Meelo is offline