BANNED
Join Date: Oct 2012
Location: City of the Dead
|
11-11-2012
, 19:09
Re: ProKreedz 2.31
|
#917
|
Quote:
Originally Posted by NucL3ra
For anti settings, use this: https://www.google.com/search?q=kz_c...hrome&ie=UTF-8
... or any Longjump stats plugin.
About the showkeys, you can remove that line. It used to be the showkeys, but I removed that part from the plugin because there are already plugins doing this function.
|
the showkeys i put
kreedz.cfg > kz_showkeys 1 in last cfg
that work fine but, after some maps that off
about fps.
PHP Code:
/* Formatright © 2009, ConnorMcLeod
Developer Checker 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 Developer Checker; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <amxmodx>
#define VERSION "0.0.4"
#define LOG_TO_FILE
public plugin_init ( ) { register_plugin("Kz Client Cvars Checker", VERSION, "ConnorMcLeod") }
public client_connect(id) { static const szCvarsSettings[] = ";developer 0;fps_max 101; fps_modem 0;cl_forwardspeed 400;cl_sidespeed 400;cl_backspeed 400" client_cmd(id, szCvarsSettings) }
public client_putinserver(id) { remove_task(id) if( !is_user_bot(id) ) { set_task(0.1, "Init_Checks", id) } }
public Init_Checks(id) { if( is_user_connected(id) ) { query_client_cvar(id, "developer", "Cvar_Result") } } public Cvar_Result(id, const szCvar[], const szValue[]) { if( is_user_connected(id) ) { switch( szCvar[0] ) { case 'd': { static const szDevKickMsg[] = "You can't play here with cvar developer different from 0"
new iLen = strlen(szValue) new iPointCount, c, i
for(i=0; i<iLen; i++) { c = szValue[i] if( c != 48 ) { if( c == 46 ) { if( ++iPointCount > 1 ) { kick_user(id, szDevKickMsg) #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } } else { kick_user(id, szDevKickMsg) #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } } } query_client_cvar(id, "fps_max", "Cvar_Result") }
// fps_m case 'f': { switch( szCvar[5] ) { case 'a': // fps_max { if( szValue[0] != '1' || szValue[1] != '0' || szValue[2] != '1' || (szValue[3] && szValue[3] != '.') ) { kick_user(id, "You can't play here with cvar fps_max different from 101") #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } query_client_cvar(id, "fps_modem", "Cvar_Result") } case 'o': // fps_modem { static const szDevKickMsg[] = "You can't play here with cvar fps_modem different from 0"
new iLen = strlen(szValue) new iPointCount, c, i
for(i=0; i<iLen; i++) { c = szValue[i] if( c != 48 ) { if( c == 46 ) { if( ++iPointCount > 1 ) { kick_user(id, szDevKickMsg) #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } } else { kick_user(id, szDevKickMsg) #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } } } query_client_cvar(id, "cl_forwardspeed", "Cvar_Result") } } }
// cl_XXXspeed case 'c': { if( szValue[0] != '4' || szValue[1] != '0' || szValue[2] != '0' || (szValue[3] && szValue[3] != '.') ) { new const szSpeedKickMsg[] = "You can't play here with speed cvars different from 400" kick_user(id, szSpeedKickMsg) #if defined LOG_TO_FILE UTIL_LogUserBadCvar(id, szCvar, szValue) #endif } switch( szCvar[3] ) { // cl_forwardspeed case 'f': { query_client_cvar(id, "cl_sidespeed", "Cvar_Result") } // cl_sidespeed case 's': { query_client_cvar(id, "cl_backspeed", "Cvar_Result") } // cl_backspeed /* case 'b': { query_client_cvar(id, "cl_upspeed", "Cvar_Result") }*/ // cl_upspeed case 'b': { query_client_cvar(id, "developer", "Cvar_Result") } } } } } }
kick_user(id, const szKickMsg[]) { emessage_begin(MSG_ONE, SVC_DISCONNECT, _, id) // oranguntanz ewrite_string(szKickMsg) emessage_end() }
#if defined LOG_TO_FILE UTIL_LogUserBadCvar(const id, const szCvar[], const szValue[]) { static szLogFile[64] new szTime[22] if( !szLogFile[0] ) { get_localinfo("amxx_logs", szLogFile, charsmax(szLogFile)) get_time("%Y%m%d", szTime, charsmax(szTime)) format(szLogFile, charsmax(szLogFile), "%s/kz_cvars_%s.log", szLogFile, szTime) }
new szName[32], szAuthid[32] get_user_name(id, szName, charsmax(szName)) get_user_authid(id, szAuthid, charsmax(szAuthid)) get_time("%m/%d/%Y - %H:%M:%S", szTime, charsmax(szTime))
new iFile = fopen(szLogFile, "a") fprintf(iFile, "L %s: <%s><%s> was kicked for illegal %s value (%s)^n", szTime, szName, szAuthid, szCvar, szValue) fclose(iFile) } #endif
that plugin work good?
when player connect with fps 101+ hes get a kick?
|
|