Raised This Month: $ Target: $400
 0% 

how to block "not single character word"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-30-2010 , 16:36   Re: how to block "not 1 characters word"
Reply With Quote #1

I'm not sure if this will work but it is similar to what you are doing:

PHP Code:
new name[32], name_len;
get_user_name(idname31);
name_len strlen(name);
for(new 
name_lenstart 0;name_lenstart name_len;name_lenstart++)
{
    if(
name[name_lenstart] > 255)
    {
        new 
userid get_user_userid(id);
        
server_cmd"kick #%d",userid);
    }

__________________
fysiks is offline
0920357689
Senior Member
Join Date: Apr 2008
Old 06-30-2010 , 19:43   Re: how to block "not 1 characters word"
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
I'm not sure if this will work but it is similar to what you are doing:

PHP Code:
new name[32], name_len;
get_user_name(idname31);
name_len strlen(name);
for(new 
name_lenstart 0;name_lenstart name_len;name_lenstart++)
{
    if(
name[name_lenstart] > 255)
    {
        new 
userid get_user_userid(id);
        
server_cmd"kick #%d",userid);
    }

my core is check player name on 0-31 characters
sure no have 3characters word in name


my english very bad sorry
0920357689 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-30-2010 , 20:57   Re: how to block "not 1 characters word"
Reply With Quote #3

Quote:
Originally Posted by 0920357689 View Post
my english very bad
Yes, you are horrible at English.

That character that you posted (at least the one that I see) is decribed by Unicode as:

U+FF05 Fullwidth percent sign

And is only a single character.
__________________
fysiks is offline
0920357689
Senior Member
Join Date: Apr 2008
Old 06-30-2010 , 21:12   Re: how to block "not 1 characters word"
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Yes, you are horrible at English.

That character that you posted (at least the one that I see) is decribed by Unicode as:

U+FF05 Fullwidth percent sign

And is only a single character.

PHP Code:
strlen(name[next single word]) > 
will kick....but how to find single word
i want use "for" to do this
0920357689 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-30-2010 , 23:01   Re: how to block "not 1 characters word"
Reply With Quote #5

Quote:
Originally Posted by 0920357689 View Post
PHP Code:
strlen(name[next single word]) > 
will kick....but how to find single word
i want use "for" to do this
I don't know what you are saying. Your example code makes no sense.
__________________
fysiks is offline
0920357689
Senior Member
Join Date: Apr 2008
Old 06-30-2010 , 23:07   Re: how to block "not 1 characters word"
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
I don't know what you are saying. Your example code makes no sense.

strlen(name[next single word]) > 1

if single word len over "single characters" will kick
but how to check one word
because name[len] can't get over "single characters word"
0920357689 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-30-2010 , 23:59   Re: how to block "not single character word"
Reply With Quote #7

Each slot in the variable "name" is a single character. If my name is "fysiks" then "name" would look like this:

Code:
name[0] = 'f'
name[1] = 'y'
name[2] = 's'
name[3] = 'i'
name[4] = 'k'
name[5] = 's'
name[6] = 0 // End of String
__________________
fysiks 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 14:46.


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