Page 1 of 1
Keeping someone out
Posted: August 3rd, 2007, 6:16 am
by Lethal323
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");
Posted: August 3rd, 2007, 5:56 pm
by 9mm
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.
Posted: August 4th, 2007, 8:19 pm
by Lethal323
I mean, in a GSC
Posted: August 5th, 2007, 3:31 am
by Drofder2004
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.
Posted: August 5th, 2007, 3:50 am
by Lethal323
This still doesnt answer my quetion
But couldnt you do something like
if ((user.name(includes "hi")));
{
then kill
}
Obviously that syntax is very wrong
?
Posted: August 5th, 2007, 5:51 am
by Drofder2004
Lethal323 wrote:This still doesnt answer my quetion
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.