Raised This Month: $ Target: $400
 0% 

Kz Cvar Checker - Fps radius


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-21-2009 , 08:20   Re: Kz Cvar Checker - Fps radius
Reply With Quote #1

%.0f -> %.1f
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-21-2009 , 18:22   Re: Kz Cvar Checker - Fps radius
Reply With Quote #2

Quote:
Originally Posted by AntiBots View Post
%.0f -> %.1f
Better to do %i and use floatround() since it was intended with 0 decimals.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joyceteamo
Member
Join Date: Jan 2013
Old 01-29-2013 , 02:12   Re: Kz Cvar Checker - Fps radius
Reply With Quote #3

Xpaw you could edit the plugin .. By the limit fps_max 333 developer 1 and fps_modem 333? I would be very grateful!

PHP Code:
/*    Copyright © 2008, ConnorMcLeod 

    Check Kz Players Cvars is free software; 
    you can redistribute it and/or modify it under the terms of the 
    GNU General Public License as published by the Free Software Foundation. 

    This program is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    GNU General Public License for more details. 

    You should have received a copy of the GNU General Public License 
    along with Check Rates; if not, write to the 
    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
    Boston, MA 02111-1307, USA. 
*/ 

#include <amxmodx> 

#define PLUGIN "Check Kz Players Cvars" 
#define AUTHOR "ConnorMcLeod" 
#define VERSION "0.1.3" 

#define _LOG 

#define SVC_DISCONNECT    2 

#define NULL_FLOAT        0.000000 
#define MAX_FPSMAX        101.0 
#define MAX_SPEED        400.0 
new const g_szCvars[][] =           {"developer""fps_max" "fps_modem""cl_sidespeed""cl_forwardspeed""cl_backspeed"
new const 
Float:g_flCvarsValues[] = {NULL_FLOAT MAX_FPSMAX,  NULL_FLOAT,   MAX_SPEED   ,     MAX_SPEED    ,   MAX_SPEED   

new 
g_iCvarNum 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_dictionary("kzcvars.txt"
    
g_iCvarNum sizeof(g_szCvars


public 
client_putinserver(id

    
set_task(0.1"FirstCheck"id


public 
FirstCheck(id

    for(new 
ii<g_iCvarNumi++) 
    { 
        
CheckClientCvar(idg_szCvars[i]) 
    } 


public 
Recheck(parm[]) 

    new 
id parm[0
    if( 
is_user_connected(id) ) 
    { 
        
CheckClientCvar(idg_szCvars[parm[1]], 1
    } 


CheckClientCvar(id, const szCvar[], iSecondCheck=0

    static 
recheck[1
    
recheck[0] = iSecondCheck 
    query_client_cvar
(idszCvar"ClientCvarResult"1recheck


public 
ClientCvarResult(id, const szCvar[], const szValue[], const recheck[]) 

    
#if defined _LOG 
        
static const szLogFile[] = "KzPlayersCvars.log" 
    
#endif 
    
if( equal(szValue"Bad CVAR request") ) 
    { 
        
#if defined _LOG 
            
log_to_file(szLogFile"%s is not a (catchable) client cvar"szCvar
        
#endif 
        
return 
    } 
     
    for(new 
ii<g_iCvarNumi++) 
    { 
        if( 
equal(szCvarg_szCvars[i]) ) 
        { 
            new 
Float:flMaxVal g_flCvarsValues[i
            if( 
str_to_float(szValue) != flMaxVal 
            { 
                if( 
recheck[0] ) 
                { 
                    
#if defined _LOG 
                        
new szName[32], szAuthid[20
                        
get_user_name(idszName31
                        
get_user_authid(idszAuthid19
                        
log_to_file(szLogFile"<%s><%s><%s><%s>"szNameszAuthidszCvarszValue
                    
#endif 
                    
new szReason[128
                    
formatex(szReason127"%L"id"KZCVAR_KICK_REASON"szCvarszValueflMaxValszCvar
                    
kick_user(idszReason
                } 
                else 
                { 
                    
client_cmd(id"%s %.0f;alias %s"szCvarflMaxValszCvar
                    new 
parms[2
                    
parms[0] = id 
                    parms
[1] = 
                    set_task
(0.1"Recheck"id+(32*i), parms2
                } 
            } 
            else if( !
recheck[0] ) 
            { 
                
client_cmd(id";alias %s"szCvar
            } 
            break 
        } 
    } 


kick_user(id, const szKickMsg[]) 

    
emessage_begin(MSG_ONESVC_DISCONNECT_id// oranguntanz 
    
ewrite_string(szKickMsg
    
emessage_end() 


Last edited by joyceteamo; 01-29-2013 at 02:27.
joyceteamo is offline
Reply



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 23:49.


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