Raised This Month: $12 Target: $400
 3% 

Plugin does not read the end of the line


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 05-07-2020 , 09:36   Plugin does not read the end of the line
Reply With Quote #1

Plugin does not see the ones coming after '/' How to fix it ?
PHP Code:
 case '0'..'9''A'..'Z''a'..'z''$''?''('')''=''['']''{''}''*''-''_''>''<''|''!''&''+''%'':''/''.'','';''#'// Add characters to the list here. 

PHP Code:
#include <amxmodx>

#define PLUGIN        "No-Spl Chars InName"
#define VERSION        "1.0"
#define AUTHOR        "Shooting King"


public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR );
}

public 
client_putinserver(idCheckName(idtrue);

public 
client_infochanged(idCheckName(idfalse);

public 
CheckNameidbool:bShowMsg )
{
    static 
ijszName[33], szNewName[33], len;
    
    
len 0;
    
szName[0] = '^0';
    
szNewName[0] = '^0';
    
    
get_user_info(id"name"szName33);
    
len strlen(szName);
    
// log_amx( "Checking.... %s[%d] ", szName, len );
    
 
for( 0leni++ )
    {
        switch( 
szName[i] )
        {
            case 
'0'..'9''A'..'Z''a'..'z''$''?''('')''=''['']''{''}''*''-''_''>''<''|''!''&''+''%'':''/''.'','';''#'// Add characters to the list here.
            
{
                
// log_amx( "a Valid Char.... %c[%d] ", szName[i], i );
                
szNewName[j++] = szName[i];
            }
        }
    }  

    if( 
33 szNewName[j] = '^0';    
    
set_user_info(id,"name",szNewName); 
    
    
/*if( bShowMsg )
    {
        client_print( 0, print_chat, "Player with original nickname ^"%s^"[%s] joined the game.", szName, szNewName );
    }*/

Snake. is offline
Send a message via Skype™ to Snake.
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-07-2020 , 10:55   Re: Plugin does not read the end of the line
Reply With Quote #2

try placing it at the end of the line and check if it's still happening.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-07-2020 , 11:26   Re: Plugin does not read the end of the line
Reply With Quote #3

Is this help?

PHP Code:
    new const AsciiCodes[][] =
    {
        { 
3364 },     // ! " # $ % & ' ( ) * + , - . / 0 - 9 : ; < = > ? @
        
97122 },    // a - z
        
6590 }      // A - Z
    
}; 
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 05-07-2020 , 11:40   Re: Plugin does not read the end of the line
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
try placing it at the end of the line and check if it's still happening.
I could not understand what u mean. The last 3 character ( ',' ';' '#' ) in the line can't be read.
Snake. is offline
Send a message via Skype™ to Snake.
Snake.
Senior Member
Join Date: Jul 2017
Old 05-07-2020 , 11:46   Re: Plugin does not read the end of the line
Reply With Quote #5

Quote:
Originally Posted by +ARUKARI- View Post
Is this help?

PHP Code:
    new const AsciiCodes[][] =
    {
        { 
3364 },     // ! " # $ % & ' ( ) * + , - . / 0 - 9 : ; < = > ? @
        
97122 },    // a - z
        
6590 }      // A - Z
    
}; 
I am not sure how to do that.
Snake. is offline
Send a message via Skype™ to Snake.
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-07-2020 , 12:14   Re: Plugin does not read the end of the line
Reply With Quote #6

Quote:
Originally Posted by Snake. View Post
I am not sure how to do that.
PHP Code:
case 33..9097..122
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 05-07-2020 at 12:15.
+ARUKARI- 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 17:56.


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