Forums Index >> Modding >> KICK SCRIPT: kick players by name from console
Page : <1> :
Cool I'll test it right away!
You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.
That's awesome! It's easy to use! It's way better than the old system! Did I say its AWESOME!
Nice work dash : )
PS: I like it a lot!
You don't have to let go of one rope before grabbing the other. But you'll have to let go of one if you want to swing forward.
Does it work for partial names, or is it the full name only?
@Michael It currenlty works for full names only. I would need some documentation on regular expression syntax for torquescript. I am having a tough time finding documentation for torquescript at all. Another function included at the link above is users()
% users();
Will output a list of all players in the format : name, IP,PING,CADD
So if someone has a wacky name you can quickly get their CADD and do the CADD.delete("loser"); trick
I welcome feedback and code. I would like to sort out how to make it available as a code from within the game available to players with admin privilege. I would also like to know how to keep a list of ips and write an ip based ban version
Made a few changes, hope you don't mind.
Ex)
$client.delete("You have been kicked out. If you try to return and continue to be an idiot, we will sick a group of monkies on your ass");
Lol, I really don't wanna be an idiot in your server Ice Punk! Lolololololololololololololol %) seems great so that you can kick all the annoying players off, like all the aliases of anon. :)
$client.delete("You have been kicked out because your brain seems to be smaller than your gun. We realize that you often find yourself inadequate in most aspects of your life. Being an idiot is not going to change your unfortunate situation. If you return we will hunt you down and shoot you. If you survive you will be shot again. Have a nice day:)");
B
$client.delete("I like cats, do you?"); *awkward silence...*
$client.delete("My hat is pink");
Beware the pink hat....
How do I kick players? I installed it.
$client.delete("How do I kick u out? Can u plz tell me?");
In the command console type
Idiot("NameOfPersonToKickGoesHere");
Nice script Dash, it sure would be nice not to allow the player to return until after the currant game is completed.
4/1/1929 to 11/17/2006 Rest in Peace Bo. GO BLUE!!!
Last edited: Sunday, June 20, 2004 at 1:04:58 PM
But if this script got into the wrong hands.... The PTT police witch theres only 2! Me and UFO we can not stop em if they boot everybody then what Hmmmmmmmm you need a counter script for some people so if you get one and you say counter it wold be like... "UP YOURS GO AWAY!" but then what if they got that to then it would be counter warz! Um on second thought I will just take it and be outta hear......
Thank you may the PTT's honor be with you!
Excellent, this is really nice. Good job.
Thank you.
Jinx
So wat do I type to get some out of that server
I give up.
:[
4/1/1929 to 11/17/2006 Rest in Peace Bo. GO BLUE!!!
Last edited: Monday, June 21, 2004 at 11:14:23 PM
LMFAO!
What??? I am going to change mine so I can kick anywhere! Hey a am a PTT POLICE how are we supposed to do our job if we don't have a script to it with? XD
Do u got 2 be a adminstrator of the server 2 kick players?
? Um whompa please make SOME sense
Hmmm, anyone know how to get a persons CADD? I noticed on the script it is just the persons ping and I would like to change it. :)
Oops you have the buggy version michael. Check the site I changed it shortly after posting
The script
Thanks. :)
Its to hard 4 me to understand :(
So to kick someone out I have to put this down ldiot("someone"); thats it?
What??? I am going to change mine so I can kick anywhere! Hey a am a PTT POLICE how are we supposed to do our job if we don't have a script to it with?
Your actually taking this "PTT police" thing seriously? I doubt if you have the nessesary skills to do that!
Plus,ThinkTanks has to have something that will stop you from doing that.
@Wompa: Yes,you do have to be the server administrator.
That's It ;)
4/1/1929 to 11/17/2006 Rest in Peace Bo. GO BLUE!!!
Last edited: Thursday, June 24, 2004 at 11:21:37 PM
If you type literally CADD.delete(""); then kick yourself in the head and try again. I mean a number when I say CADD
LOL!
Umm does it only work in dedacated?
So I type is all this junk in main.cs?
// console command: users();
// list all users in server.
// display format: NAME, IP ADDRESS, PING, CADD
Function users()
{
$len = clientgroup.getCount();
For($I=0;$I<$len;$I++)
{
$u = clientgroup.getObject($I);
$id = $u.getId();
$user = $u.nameBase;
$addr = $u.getAddress();
$ping = $u.getPing();
Echo($user@", "@$addr@", PING: "@$ping@", CADD: "@$id);
}
}
// console command name2cadd();
// maps a name to a cadd
Function name2cadd(%name)
{
$target = %name;
$len = clientgroup.getCount();
For($I=0; $I<$len; $I++)
{
$u = clientgroup.getObject($I);
If ($target $= $u.nameBase)
Return $u;
}
Return 0;
}
// console command: idiot("NameOfPersonToKickGoesHere");
// for kicking undesireable elements
Function idiot(%name)
{
$target = %name;
$client=name2cadd($target);
If ($client!=0)
{
Centerprintall($nm@" HAS BEEN KICKED FOR BAD BEHAVIOR ",4);
$client.delete("YOU ARE WELCOME BACK WHEN YOU LEARN TO PLAY WELL WITH OTHERS");
}
Else
{
Echo("Failed mapping name to a CADD");
}
}
And I tryed iyt it doesent work I dont get it....................
No Kat that is the script it goes in the bottom of your main.cs file or just save a copy of your main.cs file
And replace it with the one at the download site.
Then at the console of a dedicated server type
Idiot("dash");
To kick dash
These commands do not work from inside the game or with anything but a dedicated server.
@ -v-:
Im not an idiot. I just have a hard time understanding computer programing. So just shut up
Page : <1> :
HI all,
I made a script to kick players by name. Go here
kick script
There are instructions on its use inside the download files. However since people seem to ask here a lot...
These functions will only work from the server console, which means it has to be a dedicated server.
At the console prompt which is a % symbol type the following
Idiot("dash");
That will kick the player dash from your server
If a user has a strange name and you can't type the characters into the console use the users function
Users();
This will list all users and some info about each
NAME, IP ADDRESS, PING, CADD
CADD is the users client id you can kick users with this number
CADD.delete("");
If you type literally CADD.delete(""); then kick yourself in the head and try again. I mean a number when I say CADD
Last edited: Tuesday, June 22, 2004 at 7:55:23 PM