Keeping someone out

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Lethal323

Keeping someone out

Post by Lethal323 » August 3rd, 2007, 6:16 am

Can you do something like

if a name contains "hi" than kill?

and is this a valid command?

if(user.name = "^3':^7cr^9Y^7more^9|^3C^7ereal");

9mm
CJ Donator
CJ Donator
Posts: 183
Joined: February 14th, 2006, 10:57 pm
Location: USA

Post by 9mm » August 3rd, 2007, 5:56 pm

There are two ways you can do it with pb.

Pb_sv_badname <grace period> <name to kick for>
this will kick all players who have that name
the grace period is an integer used for the time before they are kicked if you want to warn then, and then give them time to fix their name. If you want to immediately kick the player then set it to 0.

Pb_sv_namelock <guide> <restricted name>
this will only let the player with the defined guide have that name

btw you will need pb running on your server for these commands to work.

Lethal323

Post by Lethal323 » August 4th, 2007, 8:19 pm

I mean, in a GSC

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 5th, 2007, 3:31 am

It is theoretically possible, but the process would be very script heavy. You can specify exact names, and you can also specify a name without needing the colour symbols. Check the CoDJumper mod for the part about removing colour from names.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Lethal323

Post by Lethal323 » August 5th, 2007, 3:50 am

This still doesnt answer my quetion :P

But couldnt you do something like


if ((user.name(includes "hi")));
{
then kill
}

Obviously that syntax is very wrong


?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » August 5th, 2007, 5:51 am

Lethal323 wrote:This still doesnt answer my quetion :P

But couldnt you do something like


if ((user.name(includes "hi")));
{
then kill
}

Obviously that syntax is very wrong


?
I answered that already. Yes, you can do it, but to do it you are going to have to create a really script heavy function.

It would involve comparing 'n, with 'n+1' and then, if needed, comparing with 'n+2' and then if up to that point, the answer is false, then it would have to go back and start with the next possible character.

So, again, yes its possible, just have fun trying to creat ethe script.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests