Raised This Month: $32 Target: $400
 8% 

Blocking Names


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Technical/Development       
BlueGaming
BANNED
Join Date: Nov 2013
Old 12-18-2013 , 09:40   Blocking Names
Reply With Quote #1

Description:

This plugin is cheking player name and kicking him if have a ilegal name !
Thanks claudiuhks for reading file code
For other problems / sugest , please comment topic
I hope this plugin will be used in many servers
Every update will be announcet


Other:

Server using this plugin

FAQ :
Spoiler


ChangeLog:
Spoiler


Cvars:

Quote:
namescan_msg "The msg will be printed when player is kicked"

Instalation:

1. block_name.sma => addons/amxmodx/scripting
2. block_name.amxx => addons/amxmodx/plugins
3. names.ini => addons/amxmodx/configs

4. Go addons addons/amxmodx/configs/plugins.ini and add this code :
Code:
block_name.amxx
5. Restart Server / Change Map
Attached Files
File Type: ini names.ini (19 Bytes, 204 views)
File Type: sma Get Plugin or Get Source (block_Names.sma - 623 views - 2.1 KB)

Last edited by BlueGaming; 12-19-2013 at 01:31.
BlueGaming is offline
hosimosi
Senior Member
Join Date: Apr 2013
Old 12-18-2013 , 11:27   Re: Blocking Names
Reply With Quote #2

Nice
perfectly worked , Thanks
hosimosi is offline
PoLiCe
Senior Member
Join Date: Apr 2013
Location: Xen™
Old 12-18-2013 , 11:29   Re: Blocking Names
Reply With Quote #3

This plugin already exist and this one has more features. ban/kick ..etc
-1 https://forums.alliedmods.net/showthread.php?t=17363
-2 https://forums.alliedmods.net/showth...hlight=name%2A
__________________
PoLiCe is offline
Send a message via MSN to PoLiCe Send a message via Skype™ to PoLiCe
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-18-2013 , 13:30   Re: Blocking Names
Reply With Quote #4

Use client_putinserver instead of client_connect.
client_connect is always called when someone connects, putinserver only when he is really in the server.
__________________
Kia is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 12-18-2013 , 18:12   Re: Blocking Names
Reply With Quote #5

Quote:
Originally Posted by Kia View Post
Use client_putinserver instead of client_connect.
client_connect is always called when someone connects, putinserver only when he is really in the server.
Or just client_authorized(id)
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Old 12-19-2013, 01:32
BlueGaming
This message has been deleted by BlueGaming. Reason: nvm
BlueGaming
BANNED
Join Date: Nov 2013
Old 12-19-2013 , 02:47   Re: Blocking Names
Reply With Quote #6

Quote:
Originally Posted by PoLiCe View Post
This plugin already exist and this one has more features. ban/kick ..etc
-1 https://forums.alliedmods.net/showthread.php?t=17363
-2 https://forums.alliedmods.net/showth...hlight=name%2A
Yes , i know but this plugin is more easy to use + im on to add support it



Quote:
Originally Posted by Kia View Post
Use client_putinserver instead of client_connect.
client_connect is always called when someone connects, putinserver only when he is really in the server.
UPDATE

Last edited by BlueGaming; 12-19-2013 at 02:48.
BlueGaming is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-19-2013 , 03:24   Re: Blocking Names
Reply With Quote #7

As it has been stated above, this is redundant and this is poorly coded. Unapproved.

Please search before posting a new plugin.
Please don't release a plugin when you are a beginner.

Just some fast thoughts on your code :
  • If purpose is just to read strings from a file, then it would be faster to use a Trie instead of an Array.
  • Don't call ArraySize() in a loop, it will be called for each entry. Cache the value before.
  • No need to use file_exists() as you can check directly the fopen() return value.
  • Don't use static in a fonction called one time like plugin_cfg().
  • If no entry found, then just pause the plugin ; no point to call forwards/natives for nothing.
  • You should call natives only when necessary ; retrieving cvar value/userid before when used only inside check, is pointless ;
  • When you have a bunch of same lines, don't duplicate ; create a function with this code.
  • strlen() is pointless, use the return of fgets()/trim(). Generally natives manipulating string return always a length.
  • Be consistent, and use charsmax() everywhere.
__________________
Arkshine is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 12-19-2013 , 08:19   Re: Blocking Names
Reply With Quote #8

Still releasing poorly coded plugin like you did with the old account ....
TheDS1337 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode