Raised This Month: $ Target: $400
 0% 

[REQ] Add IP in Ratescheck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VenomMix
Member
Join Date: Nov 2018
Old 05-09-2019 , 15:10   [REQ] Add IP in Ratescheck
Reply With Quote #1

Can you add IP to the list in ratescheck?
HTML Code:
/* AMX Mod script
 *
 * RatesCheck v1.60 by pRED*
 * -------------------------
 * 
 * Prints the rates all all connected players into the console
 * Rates checked are cl_cmdrate, cl_updaterate, rate, ex_interp
 *
 * Admin commands
 *      rates_list         - displays a list of all players and their rates
 */

#include <amxmodx>
#include <amxmisc>

#define ADMIN_LEVEL ADMIN_KICK

new name[32][32]
new rate[32][32]
new updaterate[32][32]
new steamid[35][32]
new cmdrate[32][32]
new interp[32][32]
new players[32]
new num

public plugin_init() {
    
    register_plugin("Rates Checker", "1.61", "pRED*");	
    register_clcmd("say !check", "rates_list", ADMIN_LEVEL, "Verifica rate-urile tuturor jucatorilor.")
    register_clcmd("say_team !check", "rates_list", ADMIN_LEVEL, "Verifica rate-urile tuturor jucatorilor.")
    register_concmd("amx_check", "rates_list", ADMIN_LEVEL, "Verifica rate-urile tuturor jucatorilor.")
  

    return PLUGIN_CONTINUE
}


public rates_list(id, level, cid) {
    
    //Check if the user has the required access level
    if (!cmd_access(id,level,cid,1)) 
        return PLUGIN_HANDLED    

    //Print an info line to the users console
    client_print(id, print_console, "Se genereaza lista...")   

   //Retrieve the rate information
    getrates(id) 
    
    
    
    //Wait 1 second for all query_client_cvar calls to finish the print rate info to console
    set_task(1.0, "printrates", id, "", 0, "a", 1)
    
      
    return PLUGIN_HANDLED
} 


public cmdrate_result_func(id,const cvar[],const value[],const param[])
{
    copy(cmdrate[param[0]],31,value)

}

public interp_result_func(id,const cvar[],const value[], const param[])
{
    copy(interp[param[0]],31,value)

}

public getrates(id)
{
    //Get Number of players in the server
    get_players(players,num,"c") 
       
    //Loop for all players and retrieve rate info
    for (new i[1] = 0; i[0] < num; ++i[0]) {
       
	query_client_cvar(players[i[0]],"cl_cmdrate","cmdrate_result_func",1,i)
	query_client_cvar(players[i[0]],"ex_interp","interp_result_func",1,i)

        set_task(0.5, "getinforates", i[0], "", 0, "a", 1)      //Wait for 0.5 seconds for cvar quering to finish then get the rest of the info  
		
    }

}


public getinforates(i)
{
    get_user_name(players[i], name[i], 31)
    get_user_authid(players[i], steamid[i], 34);
    get_user_info(players[i], "rate", rate[i], 31) 
    get_user_info(players[i], "cl_updaterate", updaterate[i], 31)
}

public printrates(id)
{  	
    //Print an info line to the users console
    client_print(id, print_console, "Id | Name | SteamId | Rate | Updaterate | Cmdrate | Ex_Interp")     

    //Loop for all players and print rates info
    for (new i = 0; i < num; ++i) {
	client_print(id, print_console, "#%d %s %s %s %s %s %s",players[i],name[i], steamid[i], rate[i], updaterate[i], cmdrate[i], interp[i])
    
    }

}
VenomMix is offline
AmXDusT
Member
Join Date: Feb 2019
Location: Italy / Albania
Old 05-10-2019 , 22:09   Re: [REQ] Add IP in Ratescheck
Reply With Quote #2

Hi, this should do it:
PHP Code:
/* AMX Mod script
 *
 * RatesCheck v1.60 by pRED*
 * -------------------------
 * 
 * Prints the rates all all connected players into the console
 * Rates checked are cl_cmdrate, cl_updaterate, rate, ex_interp
 *
 * Admin commands
 *      rates_list         - displays a list of all players and their rates
 */

#include <amxmodx>
#include <amxmisc>

#define ADMIN_LEVEL ADMIN_KICK

new name[32][32]
new 
rate[32][32]
new 
updaterate[32][32]
new 
steamid[35][32]
new 
cmdrate[32][32]
new 
interp[32][32]
new 
players[32]
new 
num
new p_ip[32][16]

public 
plugin_init() {
    
    
register_plugin("Rates Checker""1.61""pRED*");    
    
register_clcmd("say !check""rates_list"ADMIN_LEVEL"Verifica rate-urile tuturor jucatorilor.")
    
register_clcmd("say_team !check""rates_list"ADMIN_LEVEL"Verifica rate-urile tuturor jucatorilor.")
    
register_concmd("amx_check""rates_list"ADMIN_LEVEL"Verifica rate-urile tuturor jucatorilor.")
  

    return 
PLUGIN_CONTINUE
}


public 
rates_list(idlevelcid) {
    
    
//Check if the user has the required access level
    
if (!cmd_access(id,level,cid,1)) 
        return 
PLUGIN_HANDLED    

    
//Print an info line to the users console
    
client_print(idprint_console"Se genereaza lista...")   

   
//Retrieve the rate information
    
getrates(id
    
    
    
    
//Wait 1 second for all query_client_cvar calls to finish the print rate info to console
    
set_task(1.0"printrates"id""0"a"1)
    
      
    return 
PLUGIN_HANDLED



public 
cmdrate_result_func(id,const cvar[],const value[],const param[])
{
    
copy(cmdrate[param[0]],31,value)

}

public 
interp_result_func(id,const cvar[],const value[], const param[])
{
    
copy(interp[param[0]],31,value)

}

public 
getrates(id)
{
    
//Get Number of players in the server
    
get_players(players,num,"c"
       
    
//Loop for all players and retrieve rate info
    
for (new i[1] = 0i[0] < num; ++i[0]) {
       
    
query_client_cvar(players[i[0]],"cl_cmdrate","cmdrate_result_func",1,i)
    
query_client_cvar(players[i[0]],"ex_interp","interp_result_func",1,i)

        
set_task(0.5"getinforates"i[0], ""0"a"1)      //Wait for 0.5 seconds for cvar quering to finish then get the rest of the info  
        
    
}

}


public 
getinforates(i)
{
    
get_user_name(players[i], name[i], 31)
    
get_user_authid(players[i], steamid[i], 34);
    
get_user_info(players[i], "rate"rate[i], 31
    
get_user_info(players[i], "cl_updaterate"updaterate[i], 31)
    
get_user_ip(players[i], p_ip[i], 151)
}

public 
printrates(id)
{      
    
//Print an info line to the users console
    
client_print(idprint_console"Id | Name | SteamId | Rate | Updaterate | Cmdrate | Ex_Interp | IP")     

    
//Loop for all players and print rates info
    
for (new 0num; ++i) {
    
client_print(idprint_console"#%d %s %s %s %s %s %s %s",players[i],name[i], steamid[i], rate[i], updaterate[i], cmdrate[i], interp[i], p_ip[i])
    
    }


AmXDusT is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2019 , 23:35   Re: [REQ] Add IP in Ratescheck
Reply With Quote #3

FYI, you can force updaterate and rate via server settings so you'll always know that those two are within the range that you define:

sv_minupdaterate
sv_maxupdaterate
sv_minrate
sv_maxrate
__________________
fysiks is offline
VenomMix
Member
Join Date: Nov 2018
Old 05-12-2019 , 08:13   Re: [REQ] Add IP in Ratescheck
Reply With Quote #4

That's how I do, but I'm also looking for valve clients who do not save their data, and that's how I can figure out why they haven't an interp in our conditions of game.
Thanks for help / support and the ideas both.
VenomMix is offline
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 10:56.


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