- Ошибка
-
server crash
- ОС
- Linux
- Amx Mod X
-
1.9.0
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev
Build date: 07:36:33 Jul 12 2023 (3378)
Build from: https://github.com/dreamstalker/rehlds/commit/f955b07
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
Build date: 19:02:48 Dec 31 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d3c0ec8
- Версия Metamod
-
Metamod-r v1.3.0.149, API (5:13)
Metamod-r build: 11:31:17 Apr 23 2024
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/603a257
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.2.0.13 ini Start Never
[ 3] Revoice RUN - VoiceTranscoder.so v0.1.0.33 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271-OY ini Start ANY
[ 5] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 6] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 7] Accuracy Fix RUN - accuracyfix_mm.so v1.1.7 ini ANY ANY
[ 8] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386.so v5.24.0.300-dev pl4 ANY Never
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[16] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
16 plugins, 16 running
- Список плагинов
-
name version author file status
[ 1] Komut Block 1.0 kApo` editted XL KomutBlock.amxx running
[ 2] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 3] Admin Commands v12 23022024 OyunYoneticisi admincmd.amxx running
[ 4] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 5] Commands Menu 1.9.0.5271 29.10.2024fix cmdmenu.amxx running
[ 6] Players Menu 1.9.0.5271 AMXX Dev Teamf2 plmenu.amxx running
[ 7] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
- Автор плагина
- www111
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Nick Change"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "www111"
#define NAME_FULL 1024
#define NAME_PARTS 1024
#define NAME_MAXLEN 31
#define SVC_DISCONNECT 2
new pcv_name
new gf_count
new gf_names[NAME_FULL][NAME_MAXLEN+1]
new gp_count
new gp_names[NAME_PARTS][NAME_MAXLEN+1]
public plugin_init()
{
register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR )
register_dictionary( "nick_change.txt" )
pcv_name = register_cvar( "amx_name", "2" )
}
public plugin_cfg()
{
new filename[64], string[32], pos, len
get_configsdir( filename, charsmax( filename ) )
format( filename, charsmax( filename ), "%s/nick_change.ini", filename )
if ( file_exists( filename ) )
{
while( read_file( filename, pos++, string, charsmax( string ), len ) )
{
if ( len < 3 ) continue
if ( ( string[0] == '!' ) && ( gf_count < NAME_FULL ) )
{
replace( string, len, "!", "" )
copy( gf_names[gf_count++], NAME_MAXLEN, string )
}
else if ( gp_count < NAME_PARTS )
{
copy( gp_names[gp_count++], NAME_MAXLEN, string )
}
}
}
}
public client_authorized( id )
{
static name[32]
get_user_name( id, name, charsmax( name ) )
if ( !is_name_valid( id, name ) ) return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
public client_infochanged( id )
{
if ( !is_user_connected( id ) )
return PLUGIN_CONTINUE
static name[32]
get_user_info( id, "name", name, charsmax( name ) )
is_name_valid( id, name )
return PLUGIN_CONTINUE
}
stock bool:is_name_valid( id, const name[] )
{
static reason[128]
if ( get_pcvar_num( pcv_name ) > strlen( name ) )
{
formatex ( reason, sizeof ( reason ) - 1, "%L" , id, "SHORT", get_pcvar_num( pcv_name ) )
cmd_remove_user( id, reason )
return false
}
if ( is_name_banned( name ) )
{
if ( is_user_bot( id ) || is_user_hltv( id ) )
server_cmd( "kick #%d", get_user_userid( id ) )
else
{
formatex ( reason, sizeof ( reason ) - 1, "%L" , id, "REASON" )
cmd_remove_user( id, reason )
}
return false
}
return true
}
stock bool:is_name_banned( const name[] )
{
static i
for ( i = 0; i < gf_count; i++ )
if ( equali( name, gf_names[i] ) ) return true
for ( i = 0; i < gp_count; i++ )
if ( containi( name, gp_names[i] ) != -1 ) return true
return false
}
stock cmd_remove_user( const id, const reason[128] )
{
if( is_user_connected( id ) )
{
message_begin ( MSG_ONE_UNRELIABLE, SVC_DISCONNECT, _, id )
write_string ( reason )
message_end ( )
server_exec ( )
}
else if( is_user_connecting( id ) )
{
server_cmd( "kick #%d %s", get_user_userid( id ), reason )
}
}
Hello, I need this plugin. It blocks minimum characters in the nickname and banned nicknames regardless of uppercase and lowercase letters, but it crashes the server. I am using amxmodx v1.9.0. Also, there is an error in the reason display. The text written here appears in all reasons. Thank you
В этой теме было размещено решение! Перейти к решению.