Author Topic: Ban or kick function  (Read 1160 times)

I'm trying to make a code where if a client doesn't agree to something, they automatically
get banned or kicked. I know there is a serverCmdBan function, but that you need an admin
on the server. I would use %client.delete("reason"); but last I checked, putting words inside
the %client.delete doesn't work anymore. So what function can I use to ban a player with a
reason and no admins on the server?

banBLID()
kickBLID()

Idk all the vars, I imagine you can just throw in %client.bl_id

Or another solution is to create a new AI with the host's BLID and just use them in your current code.
« Last Edit: June 22, 2014, 04:44:13 AM by Thorfin25 »

banBLID()
kickBLID()

Idk all the vars, I imagine you can just throw in %client.bl_id
Sweet, looked it up and here's what I got.
http://forum.blockland.us/index.php?topic=234605.0

All the vars are there

Kickblid doesn't exist.. but you can use %client.delete("reason");

Kickblid doesn't exist.. but you can use %client.delete("reason");
Oh. Can this work too?
Code: [Select]
banBLID(%client.bl_id,"0",%reason);

Kickblid doesn't exist..
Yes it does.
Oh. Can this work too?
Code: [Select]
banBLID(%client.bl_id,"0",%reason);
The second argument is the ban time(in minutes) and it does not need to be in quotes. -1 for permanent.
« Last Edit: June 22, 2014, 07:21:00 AM by jes00 »

Kickblid doesn't exist..
Yes it does.
virtual Script banBLID() {}
virtual Script kickBLID() {}

Right there in the dump.

but last I checked, putting words inside the %client.delete doesn't work anymore.
Yes it does.

Pretty sure kickBLID would kick any instaces of that ID (such as siblings sharing a key) so I wouldn't use it for this case
« Last Edit: June 22, 2014, 08:32:08 AM by Headcrab Zombie »