Counter-Strike 1.6
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1
45.144.155.113:27015
de_dust2
Играчи: 30/32
de_dust2
Counter-Strike 1.6
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16

Edit from Kick Adversting to rename every user with more as 5 nUmbers in Name

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Edit from Kick Adversting to rename every user with more as 5 nUmbers in Name

Мнение от Infamous2018 » 13 Юни 2020, 13:35

So it looks that the Plugin still dont work correct. So i have to ask can anyone change the Plugin full that the players dont get kicked? They should only get renamend and good.

Код за потвърждение: Избери целия код

#include <amxmodx>

#define MAX_NUMBERS 5

public plugin_init()
{
	register_plugin("Max Number in Name&Chat", "1.1", "OciXCrom")
	register_clcmd("say", "OnSay")
	register_clcmd("say_team", "OnSay")
}

public OnSay(id)
{
	static szArgs[192]
	read_args(szArgs, charsmax(szArgs))
	return has_advertisement(szArgs) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}
public client_putinserver(id)
{
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	new const WHITELIST[][] =
{
	"37.59.43.196:27018"
}

	for(new i; i < sizeof(WHITELIST); i++)
	{
		if(equali(szName, WHITELIST[i]))
		{
			return
		}
	}

	if(has_advertisement(szName))
		server_cmd("kick #%i ^"Too many numbers in name.^"", get_user_userid(id))
}

bool:has_advertisement(const szString[])
{
	static iCount, i
	iCount = 0

	for(i = 0; i < strlen(szString); i++)
	{
		if(isdigit(szString[i]))
			iCount++
	}

	return iCount >= MAX_NUMBERS
}
As Example what i mean:

Or better to say : Every User who have more as 5 Numbers in the Nick should get renamend to 37.59.43.196:27018.

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Edit from Kick Adversting to rename every user with more as 5 nUmbers in Name

Мнение от atmax » 13 Юни 2020, 14:15

Код за потвърждение: Избери целия код

#include <amxmodx>

#define MAX_NUMBERS 5

public plugin_init()
{
	register_plugin("Max Number in Name&Chat", "1.1", "OciXCrom")
	register_clcmd("say", "OnSay")
	register_clcmd("say_team", "OnSay")
}

public OnSay(id)
{
	static szArgs[192]
	read_args(szArgs, charsmax(szArgs))
	return has_advertisement(szArgs) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}
public client_putinserver(id)
{
	new szName[32]
	get_user_name(id, szName, charsmax(szName))
	
	new const WHITELIST[][] =
{
	"37.59.43.196:27018"
}

	for(new i; i < sizeof(WHITELIST); i++)
	{
		if(equali(szName, WHITELIST[i]))
		{
			return
		}
	}

	if(has_advertisement(szName))
		set_user_info(id, "name", "37.59.43.196:27018")
}

bool:has_advertisement(const szString[])
{
	static iCount, i
	iCount = 0

	for(i = 0; i < strlen(szString); i++)
	{
		if(isdigit(szString[i]))
			iCount++
	}

	return iCount >= MAX_NUMBERS
}
Rest in peace my friend I always will remember you! 🖤👊

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Edit from Kick Adversting to rename every user with more as 5 nUmbers in Name

Мнение от Infamous2018 » 13 Юни 2020, 14:26

dont work. i tested ip like: 185.119.89.103:27015 and the plugin didnt changed the nickname to 37.59.43.196:27018

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Edit from Kick Adversting to rename every user with more as 5 nUmbers in Name

Мнение от Infamous2018 » 15 Юни 2020, 20:05

i got this as first from user:

Код за потвърждение: Избери целия код

#include <amxmodx>

static const WHITELIST[][] =
{
	"37.59.43.196:27018"
}
#define MAX_NUMBERS 5

public plugin_init(){
	register_plugin("Max Number in Name&Chat", "1.1", "OciXCrom")
	register_clcmd("say", "OnSay")
	register_clcmd("say_team", "OnSay")
}

public OnSay(id){
	static szArgs[195]
	read_args(szArgs, charsmax(szArgs))
	return has_advertisement(szArgs) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
}
public client_authorized(id){
	new szName[33]
	get_user_name(id, szName, charsmax(szName))

	if(!has_whitelisted(szName)&&has_advertisement(szName))	set_user_info(id, "name", "37.59.43.196:27018")
}

bool:has_advertisement(const szString[]){
	static iCount, i
	iCount = 0
	i=0

	for(i; i < strlen(szString); i++)	if(isdigit(szString[i]))	iCount++

	return iCount >= MAX_NUMBERS?true:false
}
bool:has_whitelisted(const szString[]){
	for(new i; i < sizeof(WHITELIST); i++)	if(equali(szString, WHITELIST[i]))	return true
	return false
}
Warning: Expression has no effect on line 32

is this an problem?

Nop still the self problem... i used 185.119.89.103:27015 and didnt got renamend.

>Then i got this here:

Код за потвърждение: Избери целия код

#include <amxmodx>

#define REGEX
#if defined REGEX
#include <regex>
new const MY_RPHRASE[]="(?:\d.*){9,}"
new ret, error[128]//,Regex:re
#else
const MAX_NUMBERS = 5

new const symbol[10] =
{
	'0',
	'1',
	'2',
	'3',
	'4',
	'5',
	'6',
	'7',
	'8',
	'9'
}
new UserSymb[33]
#endif

static const WHITELIST[][] =
{
	"37.59.43.196:27018"
}

public plugin_init(){
	register_plugin("Max Number in Name&Chat", "1.1", "OciXCrom")
	register_clcmd("say", "OnSay")
	register_clcmd("say_team", "OnSay")
}

public OnSay(id){
	new says[195]
	read_args( says, charsmax(says) )
	#if !defined REGEX
		if(has_advertisement(id,says))
	#else
		if(has_advertisement(says))
	#endif
			if(!has_whitelisted(says))	return
}
public client_authorized(id){
	new szName[33]
	get_user_info(id, "name", szName, charsmax(szName))

	if(!has_whitelisted(szName))
	#if !defined REGEX
		if(has_advertisement(id,szName))
	#else
		if(has_advertisement(szName))
	#endif
			set_user_info(id, "name", "37.59.43.196:27018")
}
#if !defined REGEX
bool:has_advertisement(id,szString[]){
#else
bool:has_advertisement(szString[]){
#endif
#if !defined REGEX
	new i, j
	for( i = 0; i < sizeof szString; i++ ){
		for( j = 0; j < sizeof symbol; j++ ){
			if( szString[i] == symbol[j] )	UserSymb[id]++
			else	UserSymb[id]=0
		}
	}
	return UserSymb[id] >= MAX_NUMBERS?true:false
#else
	return (regex_match(szString,MY_RPHRASE,ret,error,charsmax(error)))?true:false
#endif
}
bool:has_whitelisted(const szString[]){
	for(new i; i < sizeof(WHITELIST); i++)	if(equali(szString, WHITELIST[i]))	return true
	return false
}
Nop, this dont work too............. :(

I am using 1.8.3-Re

Код за потвърждение: Избери целия код

      description      stat pend  file                       vers            src  load  unload
 [ 1] Reunion          RUN   -    reunion_mm_i386.so         v0.1.0.92       ini  Start Never
 [ 2] AMX Mod X        RUN   -    amxmodx_mm_i386.so         v1.8.3-Re       ini  Start ANY
 [ 3] LocalizeBug Fix  RUN   -    localizebugfix_mm_i386.so  v2.4            ini  Start Never
 [ 4] Rechecker        RUN   -    rechecker_mm_i386.so       v2.5            ini  Chlvl ANY
 [ 5] ReSemiclip       RUN   -    resemiclip_mm_i386.so      v2.3.9          ini  Chlvl ANY
 [ 6] YaPB             RUN   -    yapb.so                    v2.92           ini  Chlvl ANY
 [ 7] MySQL            RUN   -    mysql_amxx_i386.so         v1.8.3-Re       pl2  ANY   ANY
 [ 8] SQLite           RUN   -    sqlite_amxx_i386.so        v1.8.3-Re       pl2  ANY   ANY
 [ 9] Fun              RUN   -    fun_amxx_i386.so           v1.8.3-Re       pl2  ANY   ANY
 [10] Engine           RUN   -    engine_amxx_i386.so        v1.8.3-Re       pl2  ANY   ANY
 [11] FakeMeta         RUN   -    fakemeta_amxx_i386.so      v1.8.3-Re       pl2  ANY   ANY
 [12] GeoIP            RUN   -    geoip_amxx_i386.so         v1.8.3-Re       pl2  ANY   ANY
 [13] CStrike          RUN   -    cstrike_amxx_i386.so       v1.8.3-Re       pl2  ANY   ANY
 [14] CSX              RUN   -    csx_amxx_i386.so           v1.8.3-Re       pl2  ANY   ANY
 [15] Ham Sandwich     RUN   -    hamsandwich_amxx_i386.so   v1.8.3-Re       pl2  ANY   ANY
 [16] SxGeo            RUN   -    sxgeo_amxx_i386.so         v2.2            pl2  ANY   Never
 [17] hackdetector     RUN   -    hackdetector_amxx_i386.so  v0.15.328.lite  pl2  ANY   ANY
 

Код за потвърждение: Избери целия код

mysql
sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here.              ;;
;; You can just list their names, without the _amxx ;;
;;  or file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
engine
fakemeta
sockets
geoip
regex
nvault
cstrike
csx
hamsandwich
sxgeo
hackdetector
ANY IDEA?

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 6 госта