Плагин блокирующий fps от 101 и developer 1

Сообщения
108
Реакции
109
Подскажите есть ли возможность запрещать клиентам выставлять значение fps_max, fps_modem больше 101 и developer 1?
 

Garey

ninjaCow
Сообщения
440
Реакции
1,092
Помог
11 раз(а)
C++:
//#define KZLEOD

#include < amxmodx >
#include < fakemeta >
#include < chatcolor >

#if defined KZLEOD
#include < KzLeod/kz >
#include < KzLeod/kz_timer >
#include < KzLeod/kz_buttons >
#endif

#pragma semicolon 1

#define PLUGIN "Kz Cvar Checker"
#define VERSION "0.2.2"

const MAX_CVAR_LENGTH = 18;

enum _:cvarsProps
{
m_szCvarName[MAX_CVAR_LENGTH],
m_iCvarType,
m_szLegalValue[6]
}

enum _:cvarsDatas
{
m_iCvDatType,
m_iCvPos,
m_szCvLegalValue[6]
}

const STUFFCMD_ALLOWED_OLD = 2;

enum
{
STUFFCMD,
DEVELOPER,
LW,
SPEED,
FPS,
FPSOVERRIDE
}

enum
{
BAD_VALUE,
GOOD_VALUE
}

new const g_szCvars[][cvarsProps] =
{
{"cl_filterstuffcmd", STUFFCMD, ""},
{"developer", DEVELOPER, "0.0"},
{"cl_lw", LW, "1.0"},
{"cl_sidespeed", SPEED, "400.0"},
{"cl_backspeed", SPEED, "400.0"},
{"cl_forwardspeed", SPEED, "400.0"},
{"fps_max", FPS, "99.5"},
{"fps_override", FPSOVERRIDE, "1.0"}
};

new Trie:g_tCvarDatas;

new g_bAllowStuffCmd[33 char];

new bool:g_bHasBeenWarned[33][ sizeof(g_szCvars) ];

new bool:g_bOn;

public plugin_precache()
{
g_bOn = false;
}

public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" );
register_logevent("LogEvent_EnteredTheGame", 2, "1=entered the game");

g_tCvarDatas = TrieCreate();
new datas[cvarsDatas];
for(new i; i<sizeof(g_szCvars); i++)
{
datas[m_iCvDatType] = g_szCvars[m_iCvarType];
datas[m_iCvPos] = i;
copy(datas[m_szCvLegalValue], charsmax(datas[m_szCvLegalValue]), g_szCvars[m_szLegalValue]);
TrieSetArray(g_tCvarDatas, g_szCvars[m_szCvarName], datas, sizeof(datas));
}
g_bOn = true;
}

get_loguser_index()
{
new szLog[80], szName[32];
read_logargv(0, szLog, charsmax(szLog));
parse_loguser(szLog, szName, charsmax(szName));

return get_user_index(szName);
}

public LogEvent_EnteredTheGame()
{
if( !g_bOn )
{
return;
}
new id = get_loguser_index();
if( id && is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
query_client_cvar(id, g_szCvars[0][m_szCvarName], "ClientCvarResult");
}
}

public ClientCvarResult(id, const cvar[], const value[])
{
if( !g_bOn )
{
return;
}
if( !is_user_connected(id) || is_user_connecting(id) )
{
return;
}

new datas[cvarsDatas];
TrieGetArray(g_tCvarDatas, cvar, datas, sizeof(datas));
new pos = datas[m_iCvPos];
switch( datas[ m_iCvDatType ] )
{
case STUFFCMD:
{
if( value[0] == 'B' )
{
g_bAllowStuffCmd{ id } = STUFFCMD_ALLOWED_OLD;
}
else
{
g_bAllowStuffCmd{ id } = CheckFixedValue(value, "0.0", 1);
}
}
case DEVELOPER:
{
if( !CheckFixedValue(value, "0.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case LW:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case SPEED:
{
if( !CheckFixedValue(value, "400.0", 3) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case FPS:
{
if( g_bAllowStuffCmd{ id } == STUFFCMD_ALLOWED_OLD )
{
if( !CheckFixedValue(value, "101.0", 3) )
{
BadCvarValue(id, value, cvar, "101.0", pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
pos++; // don't check fps_override, it doesn't exist
}
else
{
if( !CheckFixedValue(value, "99.5", 2, true) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}
case FPSOVERRIDE:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}

if( ++pos >= sizeof(g_szCvars) )
{
pos = 0;
}

query_client_cvar(id, g_szCvars[ pos ][m_szCvarName], "ClientCvarResult");
}

CheckFixedValue( const value[], const legalValue[], leftCount, bool:bFpsMax = false )
{
static iLen, c, i;

iLen = strlen(value);

if( bFpsMax )
{
if( iLen < 4 )
{
return BAD_VALUE;
}
else if( iLen == 4 )
{
return equal(value, legalValue);
}
}
else
{
if( iLen < leftCount || iLen == leftCount + 1 )
{
return BAD_VALUE;
}

if( iLen == leftCount )
{
return equal(value, legalValue, leftCount);
}

if( !equal(value, legalValue, leftCount + 2) )
{
return BAD_VALUE;
}
}

// now check if there are other chars than '0'

for(i=leftCount + 2; i<iLen; i++)
{
c = value;
if( !c )
{
return GOOD_VALUE;
}
else if( c != '0' )
{
return BAD_VALUE;
}
}
return GOOD_VALUE;
}

BadCvarValue(id, const value[], const cvar[], const legalValue[], position)
{
if( !g_bHasBeenWarned[id][position] )
{
#if defined KZLEOD
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s ^3(TIMER RESET !!)", cvar, value, legalValue);
#else
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s", cvar, value, legalValue);
#endif
if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
client_print_color(id, Blue, "^4[Kz Checker] ^3Trying to fix");
}
else
{
client_print_color(id, Red, "^4[Kz Checker] ^3You have to fix by yourself typing in console : ^4%s ^"%s^"", cvar, legalValue);
}
g_bHasBeenWarned[id][position] = true;
}
else if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
}
#if !defined KZLEOD
set_pev(id, pev_velocity, 0);
#else
xolent_ljstats_resetjump(id);
kz_reset_timer(id);
#endif
}

#if defined KZLEOD
public client_use_button(id, button)
{
if( !g_bOn )
{
return;
}
if( button == START )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
}
}
#endif
 
Сообщения
584
Реакции
1,006
Помог
18 раз(а)
Garey, бесполезен же с текущими протекторами. Достаточно даже не ответить на запрос, не то что подменить значение.
 
Сообщения
108
Реакции
109
Mistrick, ну так есть ли лучшее решение?
 

Garey

ninjaCow
Сообщения
440
Реакции
1,092
Помог
11 раз(а)
есть, измерять самому fps
15 Июл 2017
C++:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
register_plugin("Fps Checker", "0.1", "Dev-CS.ru")
register_forward(FM_PlayerPreThink, "PreThink");
}

new Fps[33];
new Float:LastCheck[33];

new Frames[33];
new Warnings[33];

public client_connect(id)
{
Warnings[id] = 0;
LastCheck[id] = 0.0;
}

public PreThink(id)
{
if(LastCheck[id] <= get_gametime())
{
Fps[id] = Frames[id];
if(Fps[id] > 101)
{
if(++Warnings[id] > 3)
{
kick_user(id, "100+ fps");
}
}
Frames[id] = 0;
LastCheck[id] = get_gametime() + 1.0;
}

Frames[id]++;
}


stock kick_user(id, szReason[])
{
new iUserId = get_user_userid(id);

server_cmd("kick #%d ^"%s^"", iUserId, szReason)
return 1
}
 
Сообщения
106
Реакции
-4
Нарушение пункта 4.7
Garey, A kak mojno dabavit na server klienskie komandi naprimer cl_minmodels "0" chtobe igroki ne smogli menyat znochenie na cl_minmodels "1" i esho komandu crosshair "0" ne minyali na crosshair "1" potom eti komandi pri vihode iz servera ne ostavalsya u kliente v confige
 
Сообщения
321
Реакции
73
Помог
11 раз(а)
Garey, если я хочу увеличить значение кика за фпс, то надо менять тут if(Fps[id] > 101) ?
 
Сообщения
106
Реакции
-4
Не могу скомпилировать
C++:
//#define KZLEOD

#include < amxmodx >
#include < fakemeta >
#include < chatcolor >

#if defined KZLEOD
#include < KzLeod/kz >
#include < KzLeod/kz_timer >
#include < KzLeod/kz_buttons >
#endif

#pragma semicolon 1

#define PLUGIN "Kz Cvar Checker"
#define VERSION "0.2.2"

const MAX_CVAR_LENGTH = 18;

enum _:cvarsProps
{
m_szCvarName[MAX_CVAR_LENGTH],
m_iCvarType,
m_szLegalValue[6]
}

enum _:cvarsDatas
{
m_iCvDatType,
m_iCvPos,
m_szCvLegalValue[6]
}

const STUFFCMD_ALLOWED_OLD = 2;

enum
{
STUFFCMD,
DEVELOPER,
LW,
SPEED,
FPS,
FPSOVERRIDE
}

enum
{
BAD_VALUE,
GOOD_VALUE
}

new const g_szCvars[][cvarsProps] =
{
{"cl_filterstuffcmd", STUFFCMD, ""},
{"developer", DEVELOPER, "0.0"},
{"cl_lw", LW, "1.0"},
{"cl_sidespeed", SPEED, "400.0"},
{"cl_backspeed", SPEED, "400.0"},
{"cl_forwardspeed", SPEED, "400.0"},
{"fps_max", FPS, "99.5"},
{"fps_override", FPSOVERRIDE, "1.0"}
};

new Trie:g_tCvarDatas;

new g_bAllowStuffCmd[33 char];

new bool:g_bHasBeenWarned[33][ sizeof(g_szCvars) ];

new bool:g_bOn;

public plugin_precache()
{
g_bOn = false;
}

public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" );
register_logevent("LogEvent_EnteredTheGame", 2, "1=entered the game");

g_tCvarDatas = TrieCreate();
new datas[cvarsDatas];
for(new i; i<sizeof(g_szCvars); i++)
{
datas[m_iCvDatType] = g_szCvars[m_iCvarType];
datas[m_iCvPos] = i;
copy(datas[m_szCvLegalValue], charsmax(datas[m_szCvLegalValue]), g_szCvars[m_szLegalValue]);
TrieSetArray(g_tCvarDatas, g_szCvars[m_szCvarName], datas, sizeof(datas));
}
g_bOn = true;
}

get_loguser_index()
{
new szLog[80], szName[32];
read_logargv(0, szLog, charsmax(szLog));
parse_loguser(szLog, szName, charsmax(szName));

return get_user_index(szName);
}

public LogEvent_EnteredTheGame()
{
if( !g_bOn )
{
return;
}
new id = get_loguser_index();
if( id && is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
query_client_cvar(id, g_szCvars[0][m_szCvarName], "ClientCvarResult");
}
}

public ClientCvarResult(id, const cvar[], const value[])
{
if( !g_bOn )
{
return;
}
if( !is_user_connected(id) || is_user_connecting(id) )
{
return;
}

new datas[cvarsDatas];
TrieGetArray(g_tCvarDatas, cvar, datas, sizeof(datas));
new pos = datas[m_iCvPos];
switch( datas[ m_iCvDatType ] )
{
case STUFFCMD:
{
if( value[0] == 'B' )
{
g_bAllowStuffCmd{ id } = STUFFCMD_ALLOWED_OLD;
}
else
{
g_bAllowStuffCmd{ id } = CheckFixedValue(value, "0.0", 1);
}
}
case DEVELOPER:
{
if( !CheckFixedValue(value, "0.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case LW:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case SPEED:
{
if( !CheckFixedValue(value, "400.0", 3) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case FPS:
{
if( g_bAllowStuffCmd{ id } == STUFFCMD_ALLOWED_OLD )
{
if( !CheckFixedValue(value, "101.0", 3) )
{
BadCvarValue(id, value, cvar, "101.0", pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
pos++; // don't check fps_override, it doesn't exist
}
else
{
if( !CheckFixedValue(value, "99.5", 2, true) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}
case FPSOVERRIDE:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}

if( ++pos >= sizeof(g_szCvars) )
{
pos = 0;
}

query_client_cvar(id, g_szCvars[ pos ][m_szCvarName], "ClientCvarResult");
}

CheckFixedValue( const value[], const legalValue[], leftCount, bool:bFpsMax = false )
{
static iLen, c, i;

iLen = strlen(value);

if( bFpsMax )
{
if( iLen < 4 )
{
return BAD_VALUE;
}
else if( iLen == 4 )
{
return equal(value, legalValue);
}
}
else
{
if( iLen < leftCount || iLen == leftCount + 1 )
{
return BAD_VALUE;
}

if( iLen == leftCount )
{
return equal(value, legalValue, leftCount);
}

if( !equal(value, legalValue, leftCount + 2) )
{
return BAD_VALUE;
}
}

// now check if there are other chars than '0'

for(i=leftCount + 2; i<iLen; i++)
{
c = value;
if( !c )
{
return GOOD_VALUE;
}
else if( c != '0' )
{
return BAD_VALUE;
}
}
return GOOD_VALUE;
}

BadCvarValue(id, const value[], const cvar[], const legalValue[], position)
{
if( !g_bHasBeenWarned[id][position] )
{
#if defined KZLEOD
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s ^3(TIMER RESET !!)", cvar, value, legalValue);
#else
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s", cvar, value, legalValue);
#endif
if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
client_print_color(id, Blue, "^4[Kz Checker] ^3Trying to fix");
}
else
{
client_print_color(id, Red, "^4[Kz Checker] ^3You have to fix by yourself typing in console : ^4%s ^"%s^"", cvar, legalValue);
}
g_bHasBeenWarned[id][position] = true;
}
else if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
}
#if !defined KZLEOD
set_pev(id, pev_velocity, 0);
#else
xolent_ljstats_resetjump(id);
kz_reset_timer(id);
#endif
}

#if defined KZLEOD
public client_use_button(id, button)
{
if( !g_bOn )
{
return;
}
if( button == START )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
}
}
#endif

17 Сен 2017
error.jpg
 
Сообщения
2,143
Реакции
1,225
Помог
44 раз(а)
C++:
//#define KZLEOD

#include < amxmodx >
#include < fakemeta >
#include < chatcolor >

#if defined KZLEOD
#include < KzLeod/kz >
#include < KzLeod/kz_timer >
#include < KzLeod/kz_buttons >
#endif

#pragma semicolon 1

#define PLUGIN "Kz Cvar Checker"
#define VERSION "0.2.2"

const MAX_CVAR_LENGTH = 18;

enum _:cvarsProps
{
m_szCvarName[MAX_CVAR_LENGTH],
m_iCvarType,
m_szLegalValue[6]
};

enum _:cvarsDatas
{
m_iCvDatType,
m_iCvPos,
m_szCvLegalValue[6]
};

const STUFFCMD_ALLOWED_OLD = 2;

enum
{
STUFFCMD,
DEVELOPER,
LW,
SPEED,
FPS,
FPSOVERRIDE
};

enum
{
BAD_VALUE,
GOOD_VALUE
};

new const g_szCvars[][cvarsProps] =
{
{"cl_filterstuffcmd", STUFFCMD, ""},
{"developer", DEVELOPER, "0.0"},
{"cl_lw", LW, "1.0"},
{"cl_sidespeed", SPEED, "400.0"},
{"cl_backspeed", SPEED, "400.0"},
{"cl_forwardspeed", SPEED, "400.0"},
{"fps_max", FPS, "99.5"},
{"fps_override", FPSOVERRIDE, "1.0"}
};

new Trie:g_tCvarDatas;

new g_bAllowStuffCmd[33 char];

new bool:g_bHasBeenWarned[33][ sizeof(g_szCvars) ];

new bool:g_bOn;

public plugin_precache()
{
g_bOn = false;
}

public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" );
register_logevent("LogEvent_EnteredTheGame", 2, "1=entered the game");

g_tCvarDatas = TrieCreate();
new datas[cvarsDatas];
for(new i; i<sizeof(g_szCvars); i++)
{
datas[m_iCvDatType] = g_szCvars[m_iCvarType];
datas[m_iCvPos] = i;
copy(datas[m_szCvLegalValue], charsmax(datas[m_szCvLegalValue]), g_szCvars[m_szLegalValue]);
TrieSetArray(g_tCvarDatas, g_szCvars[m_szCvarName], datas, sizeof(datas));
}
g_bOn = true;
}

get_loguser_index()
{
new szLog[80], szName[32];
read_logargv(0, szLog, charsmax(szLog));
parse_loguser(szLog, szName, charsmax(szName));

return get_user_index(szName);
}

public LogEvent_EnteredTheGame()
{
if( !g_bOn )
{
return;
}
new id = get_loguser_index();
if( id && is_user_connected(id) && !is_user_bot(id) && !is_user_hltv(id) )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
query_client_cvar(id, g_szCvars[0][m_szCvarName], "ClientCvarResult");
}
}

public ClientCvarResult(id, const cvar[], const value[])
{
if( !g_bOn )
{
return;
}
if( !is_user_connected(id) || is_user_connecting(id) )
{
return;
}

new datas[cvarsDatas];
TrieGetArray(g_tCvarDatas, cvar, datas, sizeof(datas));
new pos = datas[m_iCvPos];
switch( datas[ m_iCvDatType ] )
{
case STUFFCMD:
{
if( value[0] == 'B' )
{
g_bAllowStuffCmd{ id } = STUFFCMD_ALLOWED_OLD;
}
else
{
g_bAllowStuffCmd{ id } = CheckFixedValue(value, "0.0", 1);
}
}
case DEVELOPER:
{
if( !CheckFixedValue(value, "0.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case LW:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case SPEED:
{
if( !CheckFixedValue(value, "400.0", 3) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
case FPS:
{
if( g_bAllowStuffCmd{ id } == STUFFCMD_ALLOWED_OLD )
{
if( !CheckFixedValue(value, "101.0", 3) )
{
BadCvarValue(id, value, cvar, "101.0", pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
pos++; // don't check fps_override, it doesn't exist
}
else
{
if( !CheckFixedValue(value, "99.5", 2, true) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}
case FPSOVERRIDE:
{
if( !CheckFixedValue(value, "1.0", 1) )
{
BadCvarValue(id, value, cvar, datas[ m_szCvLegalValue ], pos);
}
else
{
g_bHasBeenWarned[id][pos] = false;
}
}
}

if( ++pos >= sizeof(g_szCvars) )
{
pos = 0;
}

query_client_cvar(id, g_szCvars[ pos ][m_szCvarName], "ClientCvarResult");
}

CheckFixedValue( const value[], const legalValue[], leftCount, bool:bFpsMax = false )
{
static iLen, c, i;

iLen = strlen(value);

if( bFpsMax )
{
if( iLen < 4 )
{
return BAD_VALUE;
}
else if( iLen == 4 )
{
return equal(value, legalValue);
}
}
else
{
if( iLen < leftCount || iLen == leftCount + 1 )
{
return BAD_VALUE;
}

if( iLen == leftCount )
{
return equal(value, legalValue, leftCount);
}

if( !equal(value, legalValue, leftCount + 2) )
{
return BAD_VALUE;
}
}

// now check if there are other chars than '0'

for(i=leftCount + 2; i<iLen; i++)
{
c = value;
if( !c )
{
return GOOD_VALUE;
}
else if( c != '0' )
{
return BAD_VALUE;
}
}
return GOOD_VALUE;
}

BadCvarValue(id, const value[], const cvar[], const legalValue[], position)
{
if( !g_bHasBeenWarned[id][position] )
{
#if defined KZLEOD
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s ^3(TIMER RESET !!)", cvar, value, legalValue);
#else
client_print_color(id, Red, "^4[Kz Checker] ^3Bad cvar value ^4%s : ^3%s ^4Legal Value %s", cvar, value, legalValue);
#endif
if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
client_print_color(id, Blue, "^4[Kz Checker] ^3Trying to fix");
}
else
{
client_print_color(id, Red, "^4[Kz Checker] ^3You have to fix by yourself typing in console : ^4%s ^"%s^"", cvar, legalValue);
}
g_bHasBeenWarned[id][position] = true;
}
else if( g_bAllowStuffCmd{ id } )
{
client_cmd(id, "%s ^"%s^"", cvar, legalValue);
}
#if !defined KZLEOD
set_pev(id, pev_velocity, 0);
#else
xolent_ljstats_resetjump(id);
kz_reset_timer(id);
#endif
}

#if defined KZLEOD
public client_use_button(id, button)
{
if( !g_bOn )
{
return;
}
if( button == START )
{
arrayset(g_bHasBeenWarned[id], false, sizeof(g_bHasBeenWarned[]));
}
}
#endif
 
Сообщения
106
Реакции
-4
Minni,
/hlds/web/www/amxxpc/work/scripting/CvarChecker.sma(16) : error 001: expected token: ";", but found "const"
1 Error.
Could not locate output file /hlds/web/www/amxxpc/work/plugins/CvarChecker.amx (compile failed).
17 Сен 2017
error2.jpg Garey, Minni,
 
Сообщения
2,143
Реакции
1,225
Помог
44 раз(а)
kEEp, пробуй. Выше прислал.
18 Сен 2017
И на будущее: не стоит компилировать плагин в онлайн-компиляторе! Там зачастую древние инклюды. Лучше локально.
 
Сообщения
190
Реакции
16
Помог
1 раз(а)
Как переписать в kz_cheaker'e чтобы не конкретное значение разрешал и исправлял, а диапозон, мне нужно допустимое значение ФПС не более 120? Как сделать?
 
Сообщения
187
Реакции
319
Помог
1 раз(а)
ncux0Zz, ради любопытства, почему именно больше 120?
 
Сообщения
90
Реакции
8
perforator, на популярных играх типа фастк кап разрешаться 120,меня тоже такой интересует
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу