#include <amxmodx>
#include <reapi>
#define MIN_CHARS 4
new line, txtlen
public plugin_init() {
register_plugin("Kisa Nick Engel", "1.0", "Jack86,KsV")
RegisterHookChain(RG_CBasePlayer_Spawn, "@IsSpawn", .post = true);
}
public client_putinserver(id)
{
new BadName[64],name[32]
get_user_name(id,name, sizeof (name))
while( ( line = read_file( "addons/amxmodx/configs/BadNames.ini", line, BadName, 63, txtlen ) ) != 0 )
if( equal( BadName, name ) )
{
server_cmd("kick #%d ^"%s^" nicki ile giris yapmak yasak! Lutfen nick degistir.", get_user_userid(id), name)
}
if(strlen(name) < MIN_CHARS){
server_cmd("kick #%d ^"Oyuncu adin cok kisa^"", get_user_userid(id))
}
}
@IsSpawn(const id) {
if(!is_user_alive(id)) return;
new BadName[64],name[32]
get_user_name(id,name, sizeof (name))
while( ( line = read_file( "addons/amxmodx/configs/BadNames.ini", line, BadName, 63, txtlen ) ) != 0 )
if( equal( BadName, name ) )
{
server_cmd("kick #%d ^"%s^" nicki ile giris yapmak yasak! Lutfen nick degistir.", get_user_userid(id), name)
}
if(strlen(name) < MIN_CHARS){
server_cmd("kick #%d ^"Oyuncu adin cok kisa^"", get_user_userid(id))
}
}