Raised This Month: $ Target: $400
 0% 

Blocking Characters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 07-10-2018 , 07:10   Blocking Characters
Reply With Quote #1

This plugin works good but there is a just problem.

While player connects, his name changes (characters are replaced to ' ')
But player should retry for name.

Example;

Code:
óÖğreónció connected to server.
Console command (name re nci) [deleted óÖğ chars]
Name is "óÖğrenció"
retry
re nci connected to server
name is "re nci"
I want to make 2 things. Replace null instead of space. '' not ' '
And change his name with no need retry.


PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Block Characters""1.0""PurposeLess");
}

public 
client_connect(id)
{
    new 
name[32];
    
get_user_name(idnamecharsmax(name));

    new 
bool:found false;
    
    for( new 
icharsmax(name); i++ )
    {
        if(
isalpha(name[i]))
        {
            continue;
        }

        if(
name[i] < 32 || name[i] > 126)
        {
            
//replace_all(name[i], charsmax(name) - i, name[i], "");
            //replace_all(name, charsmax(name), name[i], "");
            
name[i] = ' ';
            
found true;
            continue;
        }
    }
    if(
found)
    {
        
client_cmd(id"name ^"%s^""name);
    }

__________________
A plugin that is needed for every server.
PHP Code:
public client_connect(id)
{
    if(
get_user_iq(id) < 80)
    {
        
server_cmd("kick #%d 'You have kicked from the server because your IQ is not high enough'"get_user_userid(id));
    }


Last edited by PurposeLessx; 07-10-2018 at 07:19.
PurposeLessx is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-10-2018 , 08:58   Re: Blocking Characters
Reply With Quote #2

HLDS updated a day ago to block this you need just to update it.
__________________
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
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 07-10-2018 , 12:27   Re: Blocking Characters
Reply With Quote #3

I am using reHLDS version. So cannot update it. I need a plugin.
__________________
A plugin that is needed for every server.
PHP Code:
public client_connect(id)
{
    if(
get_user_iq(id) < 80)
    {
        
server_cmd("kick #%d 'You have kicked from the server because your IQ is not high enough'"get_user_userid(id));
    }

PurposeLessx is offline
Reply



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 16:49.


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